Florida Republican Rep. Ron DeSantis said Monday he will resign from Congress to focus on his bid for governor.

DeSantis, who was endorsed by President Trump, is facing Bernie Sanders-backed Tallahassee Mayor Andrew Gillum in what’s shaping up to be a close, nationally-watched contest.

DeSantis sent a letter to House Speaker Paul Ryan on Monday announcing his immediate resignation.

"As the Republican nominee for Governor of Florida, it is clear to me that I will likely miss the vast majority of our remaining session days for this Congress. Under these circumstances, it would be inappropriate for me to accept a salary," DeSantis said.

DeSantis had already decided not to run for re-election to Florida’s 6th congressional district seat. Republican Michael Waltz is facing Democrat Nancy Soderberg for DeSantis’ congressional seat in November.

FULL MIDTERM COVERAGE AND RACE RATINGS

Before DeSantis’ resignation, Republicans held 237 seats in Congress, while Democrats had 193.

The current governor of Florida, Republican Gov. Rick Scott, is leaving office due to term limits and is running for the U.S. Senate.

DeSantis defeated state Agriculture Commissioner Adam Putnam in Florida’s Republican gubernatorial primary on Aug. 28 after riding the wave of the president's enthusiastic endorsement to victory. The president repeatedly had implored voters to support DeSantis over Putnam.

"Such a fantastic win for Ron DeSantis and the people of the Great State of Florida," Trump tweeted last month. "Ron will be a fantastic Governor. On to November!"

Meanwhile, Gillum pulled off a major upset in defeating a half a dozen rivals, including former Rep. Gwen Graham, in the state’s Democratic primary. If he triumphs, Gillum would be the state's first black governor.

Fox News' Chad Pergram and The Associated Press contributed to this report.