A record number of young Chinese want to become bureaucrats to get the “golden rice bowl” benefits that come with a career working for the government.

The number of people taking the country’s civil-service exam had steadily dropped over the past three years but has shot up to an all-time high this year as a slowing economy has made the stability and perks of government work more attractive.

More than 1.5 million people were expected to register for the civil-service exam after a huge rush of applications Wednesday, the final day to sign up.

Test-takers specify which job they want, and the competition for some positions is fierce. There were, for example, more than 6,500 applicants for a post in the national statistics bureau’s branch in the southwestern city of Chongqing, according to the state-run People’s Daily newspaper.

In the 1980s and 1990s, as China’s market reforms sped up, the trend was for bureaucrats and the employees of state-owned companies to leave their government cocoon for the potential riches of the private sector. This career switch became known as “plunging into the sea.”

But over the past decade, the government’s grip on the economy has strengthened, luring people back into civil service. Jobs in the bureaucracy are perceived as cushy, with light workloads and plenty of benefits, including subsidized housing and free meals, hence the term golden rice bowl.

With corruption rampant, many also believe that the government offers opportunities for self-enrichment. This year’s downfall of Bo Xilai, the disgraced politician, has highlighted the extraordinary wealth available to high-level officials.

State media have lamented the surge in job applicants over the past week. The Global Times, a popular government-run tabloid, described civil-service careers as an “irresistible temptation.”

“It is abnormal that so many people are competing for each civil servant position,” it wrote in an editorial. “To move forward, China needs to provide more attractive opportunities to its people.”

The labor market in China has, in fact, remained very tight despite the economic slowdown. The Social Security Ministry said last week that there were 105 jobs for every 100 job seekers in the third quarter, level with the second quarter.

But with China set for annual growth of less than 8 percent, its slowest in more than a decade, corporate profits have suffered, leading to layoffs and pessimism in the private sector. By contrast, the civil service appears far steadier. Wages for bureaucrats are about $480 a month on average, less than what many of their peers in industry earn, though this does not include bonuses or illicit income.

It is expected that there will be about 90 candidates vying for each available government position. The bar has been set high for the most sought-after jobs. To even sit for an exam, candidates must pass strict background checks.

One blogger on Weibo, a Twitter-like service, recounted his ordeal. His first choice was a job with the securities regulator, but he was rejected for displaying insufficient writing skills. His second choice was the central bank, but he was rejected for never having studied abroad. His third choice was the insurance regulator, but he was rejected because the profession did not match his degree. His fourth choice was the banking regulator, but he was rejected for not having good enough English.

Finally, he said, the tax office in the eastern district of Beijing — his fifth choice — had agreed to let him take a test.

Civil-service exams have existed in various forms in China for more than 1,000 years, giving the government a standardized system for recruiting talented officials. However, many applicants say that today’s process is less impartial than it appears.

Ms. Lu, a doctoral student in international politics who declined to give her first name, said she was applying for the second time, aiming for a job as a translator in the Foreign Ministry.

“I just want to give it a try. I don’t think I can make it happen,” she said. “There are uncontrollable factors, like using personal connections to get it done.”

Emma Dong contributed to this report.