Pushpa Kamal Dahal, who still uses his nom de guerre Prachanda won 464 votes out of 577 votes cast in a special Constituent Assembly vote.
He defeated Sher Bahadur Deuba, a three-time former Prime Minister.
The election opens the way for the formation of a new government in the nascent Himalayan republic, capping a peace process that ended a a decade long civil war.