Todd Stephens has secured re-election, but the win came by a slim margin.
The Republican incumbent received 15,269 votes, which gave him 51.37 percent of the total, according to unofficial results on the Montgomery County website Tuesday night.
That figure was enough to push him past Democratic challenger Sara Johnson Rothman, who netted 14,438 votes, or 48.58 percent.
This will be Stephens fifth term as state representative for the 151st Legislative District. He was first elected in 2010.
The 151st District includes all of Horsham and Montgomery townships and parts of Lower Gwynedd and Upper Dublin townships.