House Speaker John Boehner (R-Ohio), who announced last week that he will resign at the end of next month, doesn't always see eye-to-eye with Sen. Ted Cruz (R-Texas).

Boehner ripped Cruz on Sunday, insinuating he's one of the "false prophets" who has made his job difficult. He also referred to previous comments in which he called Cruz a "jackass."

Cruz, in the words of one Boehner ally, "tap danced" on Boehner's "political coffin" after he announced his resignation last Friday. Cruz accused Boehner of betraying his party by making deals with Democrats.

But a closer look at their history reveals the two weren't always enemies. In fact, long before Boehner saw Cruz as a "false prophet," the 2016 Republican presidential candidate was actually his lawyer.

It was 1998, more than a decade before Boehner became speaker and Cruz was elected to the Senate. Boehner had just sued Rep. Jim McDermott (R-Washington) for allegedly breaking wiretapping laws, per The Washington Post.

That lawsuit stemmed from a Florida couple recording a call between Boehner and then-House Speaker Newt Gingrich that they heard on a police scanner. They sent the call to McDermott, who later allegedly released it to the New York Times and other publications. The call centered around ethical violations Gingrich faced at the time, and McDermott was the top Democrat on the House Ethics Committee, according to The Post.

U.S. Republican presidential candidate Ted Cruz speaks at the the Iowa Faith and Freedom Coalition Forum in Des Moines Thomson Reuters

Furious, Boehner called it an invasion of privacy. He hired Cruz, who had recently served as a clerk for then-Chief Justice William Rehnquist. The then-27-year-old Cruz made an early appearance in the press defending his client after Boehner sent out a fundraising appeal to help pay for his legal defense.

"The fund-raising letter is much ado about nothing," Cruz told the Seattle Times. "Congressman McDermott has consistently attempted to delay the litigation and drive up the expense. It is reasonably expected that Congressman Boehner will use the means at his disposal to raise the funds to pursue this lawsuit."

Cruz wouldn't end up working Boehner's case for long, and there wasn't a ruling in the case until 2004, when a federal judge sided with the Ohio congressman. Boehner ended up being awarded more than $1 million in legal fees.

Boehner was asked about the whole ordeal by Jay Leno on "The Tonight Show" last year, when he called his old legal pal a "good guy," The Post reported.

"I don't always agree with him, but he's a good guy," he said.