DES MOINES — If and when he leaves office to serve as the next U.S. ambassador to China, Iowa Gov. Terry Branstad will see an increase to his six-figure salary, will remain eligible to receive a five-figure state pension and also could become eligible for a federal pension, according to state and federal officials.

Branstad, the longest-serving governor in U.S. history, has been paid an annual salary of $130,000 each of the past five years, according to state data.

Once he becomes ambassador, Branstad will stop receiving his state salary, and instead, he will be paid a federal salary between about $170,000 and $187,000, according to a U.S. State Department spokesman.

Branstad also will remain eligible to collect a state pension from his first stint as governor and time as lieutenant governor and a state legislator, a state official said. That pension, in recent years, has been valued at about $50,000, according to his tax returns.

That would push Branstad’s annual compensation, with the combination of federal salary and state pension, above $200,000.

U.S. ambassadors also can receive various allowances, such as cost of living.

What’s more, Branstad also could, depending on various factors, become eligible for a federal pension from his job as ambassador.

Branstad would not receive a second, separate pension for his second stint as governor, the state officials said.

Branstad’s spokesman declined to comment on the governor’s current and future compensation, but he said the governor is grateful that Iowans have elected him to serve the state.

“Gov. Branstad is humbled that a farm kid from Leland would have the opportunity to serve Iowans for over 22 years as their governor,” spokesman Ben Hammes said in an emailed statement. “He is also thankful for the friendships he has made in all 99 counties and grateful for the prayers from Iowans who have encouraged him as he transitions to become the U.S. Ambassador to China.”

Branstad’s nomination by President Donald Trump to serve as ambassador to China is yet to be confirmed by the U.S. Senate, although that generally is considered a formality and a matter of time. Once confirmed, Branstad will resign as Iowa’s governor, a post he held from 1983 to 1999 and again since 2011.

The head of the state’s largest public employee union has criticized Branstad for simultaneously collecting a state salary and pension. When asked about Branstad remaining eligible for a state pension while serving in a federal role, Danny Homan, president of the American Federation of State, County and Municipal Employees Council 61, once again criticized Branstad. He referred to recent changes signed into law by Branstad that significantly weakened public employees’ collective bargaining rights.

“Gov. Branstad has proven his uncanny ability to disparage public employees while reaping their benefits in the same breath,” Homan said in an emailed statement. “How hypocritical of us to send an ambassador to China to encourage the advancement of workers’ rights when he has just decimated the rights of over 180,000 workers in Iowa.”

While the collective bargaining debate heated up at the Capitol, Iowa Rep. Sharon Steckman, a Democrat from Mason City, shared on social media a 2011 report on Gov. Branstad collecting both a state salary and pension.

“It’s interesting that he can go after public employees when he’s one himself, and one of the highest paid public employees that we have,” Steckman said this past week. “What’s good for the goose should be good for the gander.”

Branstad has earned more than $2 million in salary over his 24 calendar years as Iowa’s governor, according to state data. He became the state’s first million-dollar governor, in terms of career earnings, during his first stint, in 1999.

Branstad’s salary of $130,000 was just less than the national average in 2016, according to the Council of State Governments.

The highest-paid governor in 2016 was New York’s Andrew Cuomo at $179,000, according to the council’s report.