A B-52 nicknamed “Wise Guy” this week became the second Stratofortress ever to be returned to service from the airplane cemetery known as the “Boneyard.”

Wise Guy was retired to the 309th Aerospace Maintenance and Regeneration Group at Davis-Monthan Air Force Base, Arizona, in 2008, where it sat under the hot sun for more than a decade. Typically, aircraft that retire there are cannibalized for parts, and the vast majority of B-52s there never fly again.

But after another B-52 was consumed in a fiery, aborted takeoff at Andersen Air Force Base in Guam in 2016, the Air Force said in a release Thursday, the service needed a replacement, and the process of resurrecting Wise Guy began. It arrived at its new home at Barksdale Air Force Base, Louisiana, on Tuesday.

The B-52, which had already flown more than 17,000 hours even before it arrived at the Boneyard, needed a lot of work. Barksdale’s 307th Bomb Wing, an Air Reserve wing, and 2nd Bomb Wing worked on Wise Guy, as well as Ghost Rider, which in 2015 became the first B-52 to be resurrected.

A B-52 Stratofortress, nicknamed "Wise Guy," makes its final approach to Barksdale Air Force Base, Louisiana, May 14. The bomber was flown out of the 309th Aerospace Maintenance and Regeneration Group, also known as the "Boneyard", where it had been since 2008. (Master Sgt. Ted Daigle/Air Force)

“The jet had cracks in the rear landing gear and was missing two engines,” Master Sgt. Steven Sorge, a fuel systems mechanic for the 307th Maintenance Squadron at Barksdale, said in the release. "It also needed all its fuel cells and hoses replaced, as well as its tires."

The list of Wise Guy’s woes didn’t end there. It also needed an overhaul of its egress system, to allow its aircrew to bail out in an emergency — but that system was in rough shape.

“All of our parts for repairing the ejection seats were basically in a five-gallon bucket,” Master Sgt. Greg Barnhill, egress shop supervisor for the 307th Maintenance Squadron. "It was like putting together a jigsaw puzzle.

× Fear of missing out? Sign up for the Air Force Times Daily News Roundup to receive the top Air Force stories every afternoon. Thanks for signing up. By giving us your email, you are opting in to the Air Force Times Daily News Roundup.

Sorge said that a team of 13 to 20 maintainers were working on the B-52 at any given time.

Air Force: Bird scare led to aborted takeoff that wrecked B-52 An aborted takeoff that went wrong wrecked a B-52H Stratofortress in a May 19, 2016, accident at Andersen Air Force Base in Guam, Global Strike Command said in a Wednesday release.

After all the repairs were completed on the BUFF, maintainers ran a battery of tests on its engines, landing gear, fuel and egress systems to make sure it was flight worthy. The three-man aircrew then flew it “low and slow” to Barksdale.

A B-52 Stratofortress, nicknamed "Wise Guy," taxis into Barksdale Air Force Base, Louisiana, May 14. (Master Sgt. Ted Daigle/Air Force)

“This was a command-wide effort, with reservists and active duty offering a great deal of experience,” said Col. Robert Burgess, the commander of the 307th Operations Group, who also flew the bomber to Barksdale. “It took four months to get ready, so it was really a small effort on the aircrew side and a major effort on the maintainer side.”

After the bomber arrived, Barnhill reflected on the role he played in restoring not only Wise Guy, but also Ghost Rider in 2015.

“Bringing a bomber out of AMARG is once-in-a-lifetime chance, and I have been able to do it twice,” Barnhill said. “It’s just an honor to bring it back into service.”

When the maintainers began their work on Wise Guy, they even found a message left in its cockpit, written in black marker on a metal clipboard.

“AMARG, this is 60-034, a cold warrior that stood sentinel over America from the darkest days of the Cold War to the global fight against terror,” the note read. “Take good care of her … until we need her again.”

A note found inside the cockpit of Wise Guy, a B-52 Stratofortress, is displayed at Davis-Monthan Air Force Base, Arizona. The jet has been at the 309th Aerospace Maintenance and Regeneration Group since 2008 and was recently flown out to be restored to active service. (Air Force)