Women working in management accounting have caught up with their male colleagues in pay and benefits globally, but the gender pay gap persists in the U.S., and widens for women later in their careers.

The most competitive scenario is for women in their 20s who out-earned their young male colleagues by 25 percent worldwide, according to the Institute of Management Accountants 2019 salary survey.

Women and men took home $45,000, based on median compensation globally. That’s a fraction of what the industry pays in the U.S. and represents a sharp decline in compensation from last year due to a flood of younger accountants in the market.

More than 5,200 accountants in 78 countries took part in the survey of IMA members.

The number of responses from young professionals grew significantly. Roughly two-thirds of all participants were younger than 40. The number of accountants responding from outside the U.S. also increased.

Those demographic shifts contributed to the steep 38 percent decrease in the median global total compensation from the previous year’s median $73,000. That year, women earned just 90 percent of what men took home based on median salary and compensation around the world.

The pay gap reversal for the youngest group of accountants suggests that they start their careers on equal footing, according to the survey.

Women in the U.S. earn 85 percent of what their male peers take home—an improvement from 81 percent the prior year. But the wage gap grows as workers age. Women 50 and older earn just 80 percent of what their male colleagues make.

In the U.S., where the wage gap hasn’t budged, women on average earn 19 cents less for every dollar earned by men, said Ariane Hegewisch, program director on Employment and Earnings for the Institute for Women’s Policy Research based in Washington.

Among high-wage professions like accounting and financial services, the gap is even wider, she told Bloomberg Tax.

Pay equity could be short-lived if the profession doesn’t retain women, who are joining the profession in growing numbers around the world, or if those women aren’t able to climb the career ladder at the same rate as their male peers, Hegewisch said.

Too Few Role Models

Women in the U.S. are leaving the profession and they aren’t advancing their careers, said Patricia Cummings, co-managing partner of Citrin Cooperman & Co. LLP’s New York office.

Cummings said she sees that lack of diversity in her work as a public accountant interacting with corporate clients, who are mostly men. She said the lack of women in positions of leadership and authority deprives women of a potential advocate as they build their careers.

“There just aren’t enough women that are visible role models for the women that are coming up the ranks,” she said.

The median total compensation for management accountants in the U.S. was $102,000, according to the survey.

The IMA survey also found that management accountants feel confident in their job security, even as rapid technological change transforms how accountants work.

Sixty-seven percent of accountants worldwide said they don’t believe that artificial intelligence will replace them anytime soon. That number was even higher in the U.S., at 79 percent.

However, about half said their company and finance divisions would be greatly impacted by AI in the next two years.