Midlothian North and Musselburgh voters returned SNP candidate Colin Beattie to the Scottish Parliament for a second term.
Mr Beattie secured the seat with 16,948 votes.
Labour held on to second place with Bernard Harkins securing 9913 votes, Jeremy Balfour (Con) was third with 6267 votes.
The Liberal Democrats’ Jackie Bell polled 1557 votes.
After the result was announced Mr Beattie thanked his wife, Lisa, his campaign team, the fellow candidates.
“I intend to give a strong voice to this constituency and continue to serve you to the best of my ability but much more needs to be done. We have an ambitious programme for Scotland, for a fairer and more prosperous country for all of us,” he said.