Bruce Arena coached the U.S. national team to the 2002 and 2006 World Cups but failed to save the troubled 2018 campaign. (David Zalubowski/AP)

The U.S. Soccer Federation was preparing to fire Jurgen Klinsmann and replace him with Bruce Arena in the spring of 2016, about six months before the governing body made that coaching change in an effort to revive the damaged World Cup qualifying campaign.

Those revelations surface in Arena’s autobiography, “What’s Wrong With US? A Coach’s Blunt Take on the State of American Soccer After a Lifetime on the Touchline,” which will go on sale June 12.

In an advance copy sent to The Washington Post, Arena wrote he met with USSF President Sunil Gulati and chief executive Dan Flynn in Chicago. “They said it was time for a change,” Arena wrote.

At the time, Arena was in his eighth full season coaching MLS’s Los Angeles Galaxy while the men’s national team under Klinsmann had stumbled through the first four semifinal-round qualifiers with a 2-1-1 record against weak competition.

Gulati, Arena wrote, was trying to finalize a deal without Arena’s agent, Richard Motzkin, getting involved. Arena didn’t want to sign off on it without Motzkin’s input. The next day, Arena said he and Flynn were scheduled to talk further about the job.

The conversation never took place because of an urgent medical issue: Flynn needed to undergo a heart transplant. He had suffered from heart problems for many years, and his number had come up for a lifesaving transplant in Kansas City, Mo.

“So just after Sunil and Dan and I had a meeting to decide I’d be taking over the U.S. team, Dan got the call,” Arena wrote. The transplant was a success, but Flynn faced months of recovery.

“I felt a little bad for Sunil,” Arena wrote. “He wanted to make a change and replace Klinsmann, but he was nervous about pulling the trigger. The timing was already going to be awkward, with Copa America [Centenario] coming up in June. Now Dan was gone for two months. It didn’t feel right to move ahead at that time. … Events had already been set in motion, though.”

Gulati said Tuesday night that he did not want to comment at this time. USSF and Galaxy spokesmen said their respective organizations didn’t want to comment.

Read passages from the book, multiple sources told the Insider that Arena’s accounts were accurate. One confirmed the timeline of the proposed coaching change earlier in 2016, saying “things weren’t great under Jurgen, and it was the right time.”

During the discussions with the USSF, Arena said he had kept the Galaxy in the loop. When the deal to become national team coach collapsed and “I gave the Galaxy the news I’d actually be staying, it was a little awkward,” he wrote. “They were happy that they weren’t losing me, but I also had the feeling they were a little pissed off that I was contemplating moving on.”

Arena remained with the Galaxy, which finished 12-6-16 in the regular season and lost to Colorado in the semifinals of the Western Conference playoffs.

Klinsmann gained a reprieve by guiding the U.S. squad to the semifinals of Copa America Centenario, the traditional South American competition staged at U.S. venues for the first time. Had the Americans flopped, a coaching change before World Cup qualifying resumed seemed likely. In September, the Americans secured passage to the final round of qualifying by thumping St. Vincent and the Grenadines and Trinidad and Tobago by a combined 10-0.

Two months later, at the start of the final round, U.S. troubles returned. Following a 2-1 home defeat to archrival Mexico, the Americans were routed in Costa Rica, 4-0.

“I had trouble watching the Costa Rica game,” Arena wrote. “Seriously. It was uncomfortable for me to see the U.S. team playing that way, out of sync and at odds with one another, looking as though they didn’t really care all that much. … Those back-to-back losses were a fiasco for U.S. soccer, and no matter how much blame lay at Klinsmann’s feet, it was clear he’d coached his last game for the U.S.

“Having been offered the job months earlier, I knew what was coming.”

A few weeks later, Arena wrote, he and Gulati met at Los Angeles International Airport to proceed with final negotiations. Motzkin was later involved, as well.

On Klinsmann, Arena wrote: “I like Jurgen, and there’s no question that in pushing the program forward in many ways, he made my job easier.”

Arena, who had led the United States to the 2002 and 2006 World Cups, failed to get the job done. After two victories and two draws in the final qualifying round — plus the CONCACAF Gold Cup championship last summer — the Americans went 1-2-1 down the stretch. A 2-1 defeat at last-place Trinidad and Tobago on the final day ended the U.S. streak of seven consecutive appearances in soccer’s marquee event — and ended Arena’s second gig.

“I knew when I took the job that we had a steep road ahead of us,” he wrote in the introduction to the 288-page book, written with journalist Steve Kettmann and published by HarperCollins. “If I had it all to do over again, I’d take the job again in a second, and even though people don’t want to hear it, I don’t think that, given the limited time I had, there is much I would do differently, either.”

In the book, Arena also traces his family roots on Long Island, his playing career and coaching successes at the University of Virginia and D.C. United. He details the 1996 Olympic team, his first two World Cup tours, a brief stay working for the New York Red Bulls and time with David Beckham and the Galaxy, which won three MLS Cups under his leadership. He also addresses MLS’s pains and gains, American soccer’s infrastructure and the path forward after failing to qualify for the World Cup.

Funniest line: “DaMarcus Beasley lined up to take a corner kick in El Salvador one time and had half a chicken thrown at him. He didn’t say which half.”

Read more soccer coverage:

Latest ripple of missing the World Cup: USMNT can’t seem to find good teams to play

USMNT World Cup failure gets blasted by Taylor Twellman in ESPN rant

A lot of U.S. Soccer employees were paid more than its world champion women’s coach