Senator Marco Rubio of Florida said Wednesday that he would run for re-election, abandoning plans to pursue a more lucrative career in the private sector and jolting a competitive race that is crucial to Democrats’ plans to retake control of the Senate.

Mr. Rubio, 45, who had told associates of his reluctance to give up the high profile and political power that a Senate seat offers, will enter the race with the formidable advantages of incumbency, national name recognition and strong ties to the Republican Party’s donor base.

But he faces numerous hurdles, the most difficult of which may be his history of talking down the Senate as unfulfilling and frustrating at times. He is also coming off a bruising run for president that ended with an embarrassing 18-point loss to Donald J. Trump in his home state on March 15 — a contest that focused in no small part on Mr. Rubio’s frequent absence from the Senate and from his duties in Florida as he campaigned nationally.

In a preview of what is expected to be one of the most bitter and most expensive Senate races in the country, within minutes of Mr. Rubio’s announcement on Wednesday, Democrats accused him of political opportunism and hypocrisy.