WASHINGTON – Veterans Affairs Secretary David Shulkin is being replaced, President Trump tweeted Wednesday, ending weeks of speculation and uncertainty about his fate.

Trump said he is nominating Navy Rear Adm. Ronny Jackson, official physician for the president and his predecessor, Barack Obama, to be the next VA secretary.

"I am thankful for Dr. David Shulkin's service to our country and to our great VETERANS!" the president tweeted.

He said Robert Wilkie, an undersecretary at the Pentagon, will take over the agency as acting secretary.

Shulkin had been locked for months in a power struggle with a group of Trump political appointees among his senior staff.

Shulkin had pledged the VA would not be privatized on his watch but would provide veterans expanded opportunities to get private sector care. The Trump appointees want a more comprehensive overhaul and to give veterans more access to VA-funded care in the private sector.

Trump had praised the Cabinet secretary several weeks ago for doing a “great” and “incredible” job leading the charge to fulfill his pledges to improve the VA.

Shulkin himself provided the critical opening that led to his downfall. After touting Trump's campaign pledges to increase accountability at the VA, he balked at the results of an investigation released last month that found he and his staff committed ethics violations in planning and taking a European trip last year.

He blasted the VA inspector general’s findings that he improperly accepted Wimbledon tickets and airfare for his wife during the 10-day junket. He refused to accept the determination that his chief of staff misled ethics officials to get clearance for his wife's airfare, suggesting that her email had been hacked. Shulkin later expressed regret and repaid the cost of the tickets and airfare. He also complained that the appointees were targeting and undermining him.

His response left many lawmakers, veterans groups and others who might have come to his defense in a tough spot, and they remained largely silent for days after the investigation report's release Feb. 14. By the time they did speak out, it may have been too late.

Two days after the report's release, the White House unilaterally installed a new VA chief of staff, Peter O’Rourke, who was a member of Trump’s transition team and an ally of the Trump appointees. VA spokesman Curt Cashour said “additional personnel accountability actions” were possible.

The White House never removed that cloud over Shulkin's future. Spokeswoman Sarah Sanders said that Trump supported the work Shulkin did as secretary but that the situation was "under review."

Shulkin made it roughly 13 months in Trump's Cabinet. He was appointed by Obama as undersecretary for health at the VA in July 2015.

He fulfilled some of Trump's campaign promises on veterans' issues, overseeing the creation of a 24-hour White House hotline for veteran complaints and an Accountability and Whistleblower Protection Office, which drew praise for its early efforts.

Shulkin had been working with Congress to pass landmark legislation that would expand — if moderately — veterans' access to private sector care, and the measure was poised to pass the Senate before the power struggle between Shulkin and Trump appointees erupted into public view.

He ordered plans for the largest restructuring of the VA in more than 20 years after the VA inspector general uncovered failures at the Washington VA medical center that had festered for years under VA officials at local, regional and national levels who knew about them but didn't fix them.

The fate of the legislation and reorganization after Shulkin’s departure is uncertain.

The chairman of the House Veterans Affairs Committee, Rep. Phil Roe, R-Tenn., said he thinks Shulkin did a "fantastic job, and I hate to see him go.

"That said, I respect President Trump’s decision, support the president’s agenda and remain willing to work with anyone committed to doing the right thing on behalf of our nation’s veterans," Roe said. “I am in the process of reaching out to Dr. Jackson, and I look forward to building a strong relationship with him also.”