Ray LaHood announced Tuesday that he is stepping down as U.S. transportation secretary. In a statement, President Obama thanked LaHood “for his dedication, his hard work, and his years of service to the American people.” (Chip Somodevilla/GETTY IMAGES)

Ray LaHood, the Illinois Republican who turned distracted driving into a national crusade while serving a Democratic president, will step down after four years as transportation secretary in the Obama administration.

LaHood is the only Republican in the Cabinet, a mantle that will be carried by former senator Chuck Hagel of Nebraska if he wins Senate confirmation as defense secretary.

LaHood’s relentless campaign against distracted driving, his safety-first mantra and his determination to visit every state in the union gave the Peoria native a higher profile than several predecessors in the role, traditionally played out in the shadow of more glamorous Cabinet jobs.

LaHood made the announcement in a statement Tuesday: “I have let President Obama know that I will not serve a second term as Secretary of the U.S. Department of Transportation. It has been an honor and a privilege to lead the Department, and I am grateful to President Obama for giving me such an extraordinary opportunity.”

There was no immediate word from the White House on who would replace him, but the fact that LaHood held off any announcement during a period when other second-term Cabinet appointments were being announced hinted that an active search may have been underway.

The rumor mill was rife with suggestions, including Los Angeles Mayor Antonio R. Villaraigosa, who made a name for himself by rebuilding that city’s transit system; former Pennsylvania governor Edward G. Rendell; National Transportation Safety Board Chairman Deborah A.P. Hersman; and James L. Oberstar, the former Minnesota congressman who once chaired the House transportation committee.

But the transportation job has often defied Beltway gossip, most recently with the selection of LaHood and, during the administration of President George W. Bush with the appointment of Norman Y. Mineta, a Californian who served as a Democrat in Congress.

LaHood, in an interview with the Associated Press on Tuesday, acknowledged publicly what he had been telling friends privately for some time, saying that he was “conflicted” because he loved his job, “the best job I’ve ever had in public service.” He said he told Obama a week after the election that he thought he needed to move on.

LaHood said he would remain until a successor is confirmed by the Senate. If Obama nominates a successor shortly, that would be a few months.

Obama in a statement thanked LaHood “for his dedication, his hard work, and his years of service to the American people.”

“I also want to thank Ray for his friendship,” Obama said.

The two men came to know one another as Obama rose to become an Illinois senator while LaHood served as a Republican in Congress.

“Years ago, we were drawn together by a shared belief that those of us in public service owe an allegiance not to party or faction, but to the people we were elected to represent,” Obama said. “And every American who travels by air, rail or highway can thank Ray for his commitment to making our entire transportation system safer and stronger.”

Serving in the Cabinet of a Democratic president tested the political skills LaHood had learned on Capitol Hill, first as a top aide to House Minority Leader Robert Michel and later after assuming the congressional seat when his mentor retired. During the 14 years he represented the district of his home town, Peoria, LaHood saw Congress evolve from a stage for compromise into a more contentious ideological battleground.

He served on the House transportation committee, which continued as a relative oasis of compromise for two simple reasons: the universal need for transportation made it bipartisan, and the desire of individual members to earmark funding for their districts made negotiating an art.

Although earmarks fell by the wayside after LaHood left Congress, his skill at finding compromise and his ability to cross party lines proved valuable to the Obama administration.

“Four years ago, my good friend Ray LaHood put party politics aside in order to help modernize our transportation infrastructure and speed our economic recovery,” Rep. Nick J. Rahall II (W.Va.), the ranking Democrat on the transportation committee, said in a statement.

Locally, LaHood stepped in to help find a funding compromise when politicians came to loggerheads over Metro’s $5.6 billion Silver Line extension to Dulles International Airport.

LaHood’s nomination to the Cabinet and his influence within the administration was enormously enhanced because one of his closest friends — Rahm Emanuel — was the president’s chief of staff. LaHood and Emanuel, now mayor of Chicago, exchanged phone calls or text messages on a daily basis.

Early in his tenure at the Transportation Department, LaHood played a central role in engineering the White House economic stimulus package. He later became the administration’s point man in advocating for high-speed rail service, and he pushed for expansion of the Transportation Investment Generating Economic Recovery grant program that helped fund state road and bridge projects.

“His understated but more powerful impact has been on the policies in last year’s transportation bill, which the administration strongly influenced behind the scenes,” said Joshua Schank, president of the Eno Center for Transportation. In addition to lending his weight to passage of the first major transportation funding bill since 2005 — sometimes using the bully pulpit even as he worked quietly behind the scenes — LaHood also was the silent hand in other administration successes. He is credited with finding eight Republican votes to support a key energy bill.

But he found his passion in what he called a “crusade” against distracted driving, a growing ­issue that had been overshadowed by long-term highway safety concerns such as drunken driving. Due in part to his efforts, the District and 10 states prohibit hand-held cellphone use. Sending and receiving text messages is banned in the District and 39 states.