KUALA LUMPUR, Malaysia — Though it held on to power in the election on Sunday, the governing National Front coalition suffered an important loss: For the first time in 44 years, it failed to win more than 50 percent of the popular vote. Analysts said the results left Prime Minister Najib Razak’s position far from secure.

Mr. Najib and his National Front coalition, which has governed Malaysia since independence in 1957, won 133 of the 222 seats in Parliament on Sunday, aided by favorably drawn district boundaries. News of the victory prompted Malaysian stocks to surge nearly 8 percent on Monday, and the country’s currency, the ringgit, jumped in value.

Both had been depressed by signs that the National Front was in greater danger of losing power than ever before. As it was, the three-party opposition People’s Alliance took seven seats from the National Front, extending the gains it made in the last election in 2008, when the Front lost the two-thirds majority that had allowed it to amend the Constitution at will. The 2008 vote hastened the resignation of Abdullah Ahmad Badawi as prime minister the next year, giving way to Mr. Najib.

The leader of the People’s Alliance, Anwar Ibrahim, said Monday that the latest elections were marred by fraud and that his coalition would challenge the results of some races.