Donald Trump Jr. and the Senate Intelligence Committee have reached a deal to meet in mid-June for a private interview that will be limited in time to two to four hours, according to a source familiar with the situation.

As Monday came to a close, the president’s eldest son was planning on telling Chairman Richard Burr (R-NC) and Co. to take a hike. Trump Jr. had a letter drafted and ready to go to inform the Senate committee that he would not come in for an interview, that he wasn’t going to plead the fifth, and that he was ready to be held in contempt. (The Daily Beast has reviewed the letter.)

But then, according to the source, roughly an hour before the 5 p.m. ET Monday deadline set by the committee, a member of Trump Jr.’s legal team got a call from Senate intel stating that the committee wanted to work out the details for a deal satisfying both parties. The deadline was extended 24 hours, and by that time, the agreement had been struck.

The decision ends a dispute within the Republican Party over the president’s eldest son’s cooperation with congressional subpoenas. Trump allies had accused Burr of caving to Democrats by issuing a subpoena for Trump Jr.’s testimony. Burr responded by pointing out that Trump Jr. has twice agreed to voluntary interviews but failed to show up.

The agreement prevents Burr from having to initiate contempt of Congress proceedings against Trump Jr., a move that would pit him against President Trump, who called the subpoena “unfair.”

“It’s really a tough situation because my son spent, I guess, over 20 hours testifying about something that Mueller said was 100 percent O.K.,” Trump told reporters at the White House on Tuesday. “And now they want him to testify again. I don’t know why. I have no idea why, but it seems very unfair to me.”

Trump Jr. has agreed to talk about Trump Tower Moscow and the June 2016 meeting at Trump Tower in Manhattan, per another source familiar.