With nearly 70 percent of the votes counted, Erdogan's party was above 46 percent of the votes while the main opposition CHP was at just over 30 percent, according to state-run TRT television.
"I thank my Lord for granting such a victory, such a meaningful result," Erdogan said at a victory rally in Ankara, speaking to a crowd of supporters who had been chanting, "Turkey is proud of you!"
Incumbent candidates from Erdogan's Justice and Development Party, better known by its Turkish acronym AKP, also were leading in high-profile races in Istanbul and Ankara. Voter turnout appeared to be heavy, with people forming long queues at polling stations.
The strong results were a big boost for the prime minister following a tumultuous corruption scandal. In recent days, Erdogan has also provoked outrage at home and abroad by blocking access to Twitter and YouTube.
Fadi Hakura, a Turkey analyst at London-based independent policy institute Chatham House, said neither corruption issues nor media freedoms determined the elections.
"Overall, the people are happy with the government's economic performance," he said.
"His victory speech was uncompromising, tough and polarizing," the analyst added. "It is an indication that he will intensify his current robust style of leadership."
The result could embolden Erdogan to run for president in an election scheduled for August. Prior to Sunday's showing, he had appeared to be leaning against that route, which has risks. In a direct vote, he would have to win 50 percent in a country that is deeply polarized over his rule.
Erdogan and his party have dominated Turkish politics over the past decade in a period of great prosperity. The party came to power backed by a pious Muslim base looking for greater standing in a country that had for decades favored a secular elite. But AKP, whose party symbol is a light bulb, has also cultivated an identity of pragmatism and competency.
That image has been damaged by the corruption scandal, with a series of leaked tapes bringing down four ministers with revelations of bribe-taking and cover-ups. One tape allegedly involves Erdogan and family members, but he and his allies have rejected the allegations as a plot orchestrated by followers of U.S.-based Muslim cleric Fethullah Gulen, a former Erdogan ally who has split with him.
Following the results, Erdogan promised retribution against Gulen's movement.
"We shall enter into their caves," he said. "They will pay and account for their deeds."
In the wake of the scandal, Erdogan has shuffled thousands of police officers and tightened control of the judiciary, which had launched investigations. The moves prompted concern that Erdogan was moving toward more authoritarian rule.
But in his victory speech, Erdogan said that democracy in Turkey is strong.
"We have the democracy which the West is longing for," he said.