Sen. Mike Lee, R-Utah talks on his cellphone outside a Senate Republican meeting on Capitol Hill in Washington, Tuesday, July 18, 2017. President Donald Trump blasted congressional Democrats and “a few Republicans” over the collapse of the GOP effort to rewrite the Obama health care law. (AP Photo/Carolyn Kaster)

WASHINGTON (AP) — When Sens. Mike Lee and Jerry Moran decided they were ready to disrupt the GOP rewrite of the health care law, they chose President Donald Trump’s favorite medium.

They could not support Senate Republicans’ plan, the somewhat unlikely pair of conservatives tweeted at 8:30 p.m. Monday night, giving no heads up to the White House or Senate leaders before pressing send.

The story behind the statement reveals two senators willing to be branded as bill killers and seemingly unconcerned with trying to soften the blow with party leaders.

The announcement, coming after some 10 days of conversations between the men, stunned official Washington and left Majority Leader Mitch McConnell at least two votes short in the closely divided Senate from being able to move forward with the GOP bill, effectively sinking the measure. It landed shortly after Trump dined with a group of senators to discuss strategy – unwittingly plotting a plan that would immediately become outdated.

Sen. John Cornyn, the second-ranking Republican leader, found out about Lee’s defection after the White House dinner of rosemary-grilled rib eye and summer vegetable succotash. He “had no idea it was coming,” Cornyn said.

Another Republican, South Carolina Sen. Lindsey Graham, found out from TV news.

Moran, a second-term lawmaker from Kansas who isn’t known for making waves, and Lee, a two-term senator from Utah who has clashed with Trump, have been talking over the past 10 days about the health care legislation and agreed the GOP bill did not go far enough to repeal Obamacare or address rising health-care costs. They decided to announce their position to make the bill’s fate clear and allow senators to move on, Moran said.

“It could have been prolonged for days or weeks while no one said anything,” Moran said in an interview.

Moran, who oversaw the Senate Republicans’ 2014 election campaigns, concluded last week he wouldn’t vote for the latest version of the bill but “gave myself a weekend in Kansas to think about it,” he said.

Lee had helped draft an amendment, along with fellow conservative Sen. Ted Cruz, R-Texas, that would allow insurers to sell skimpy plans alongside more robust ones to lower costs. Cruz agreed to some changes in wording by GOP leaders, but Lee thought the new language allowed too many Obama-era regulations to remain in place.

After talking again, Moran and Lee agreed Monday night on a statement drafted earlier in the day. They issued their statement shortly after a White House dinner attended by seven GOP senators – all likely yes votes on the health care bill. Neither Lee nor Moran attended.

A Lee spokesman said the statement – and its timing – “had nothing to do with the White House dinner. It was not a reaction in any way.”

The statement was made public as soon as it was ready, the spokesman said.

Neither Trump nor McConnell received advance warning about the statement, although it’s likely that neither the president nor the Senate leader was completely surprised.

Trump and Vice President Mike Pence spent the weekend calling lawmakers, including Lee and at least seven other GOP senators, according to the administration. Trump talked politics, while Pence discussed policy.

Trump called Lee on Saturday, and Lee told the president he was leaning against the bill, for the reasons he later made public.

Lee told Utah’s KSL Newsradio that he had a great conversation with Trump, when he told the president his “consumer freedom” amendment had been weakened and that he wasn’t sure that he could support the bill.

“He was encouraging to me and said, you know, ‘Just see what changes you can make to it,’ ” Lee said.

Lee and McConnell did not talk over the weekend, but Lee spoke twice to Cornyn, R-Texas, the majority whip.

Trump, who frequently takes to Twitter to announce proposals or denounce opponents, was blindsided by, of all things, a tweet.

He told reporters Tuesday he was “very surprised when the two folks came out last night, because we thought they were in fairly good shape. But they did. And, you know, everybody has their own reason.”

Moran said while he remained committed to repealing the health care law, Congress needs to make a “fresh start” on writing a replacement bill in an “open legislative process.”

“We should not put our stamp of approval on bad policy,” he said, in a statement that followed the tweet.

In his own statement, Lee said the GOP bill does not repeal all the Obamacare tax increases and “doesn’t go far enough in lowering premiums for middle class families; nor does it create enough free space from the most costly Obamacare regulations.”

Both explanations were issued on social media.

“Twitter is a nice medium to get your message out,” Lee’s spokesman said.