He was the first U.S. senator to endorse Donald Trump. And like Trump, Sen. Jeff Sessions has for years espoused views on immigration and trade out of step with prevailing Republican powerbrokers.

"You have asked for 30 years, and politicians have promised for 30 years, to fix illegal immigration. Have they done it?" Sessions asked at a February campaign rally in his home state. To a thunderous "No!" from the crowd, he promised: "Donald Trump will do it."

The alliance between the four-term senator, a measured Southerner known for his down-to-earth demeanor, and the freewheeling, over-the-top Trump at first seemed unexpected, at least in terms of style. But Sessions, now sometimes mentioned as a possible vice presidential pick, has provided valuable policy support and advice to Trump's campaign.

Sessions, 69, is perhaps best known outside of Alabama as an ardent hardliner on immigration. He fought the 2013 "Gang of Eight" bipartisan bill that sought to create a path to citizenship for millions of immigrants now in the country illegally and was an early advocate of additional fencing along the U.S.-Mexico border.

At the Alabama rally, he also criticized the Trans-Pacific Partnership, a trade agreement supported by many GOP leaders, as "Obamatrade."

"He doesn't waver on things. He doesn't take a poll and see what people are thinking," Alabama Republican Party Chairwoman Terry Lathan said of Sessions.

Jefferson Beaureguard Sessions III grew up in a small town outside of Selma. He now calls the port city of Mobile home. Sessions graduated from the University of Alabama in 1973. He served as U.S. attorney for 12 years during the Reagan and Bush administrations and was Alabama's attorney general.

Also like Trump, he has faced criticism on issues of race.

Sessions was nominated for a federal judgeship in 1986 by President Ronald Reagan, but the nomination was derailed after Democrats criticized his record on civil rights as U.S. attorney and accused him of making racially insensitive remarks. A black assistant prosecutor testified that Sessions had called him "boy," an accusation Sessions vehemently denied.

Other confirmation hearing witnesses accused him of describing civil rights groups as "un-American." Sessions said those opposing his nomination were trying to distort off-hand remarks and retaliating for a voter fraud prosecution his office had pursued.

He was elected to the U.S. Senate 10 years later, in 1996, winning the seat of retiring Sen. Howell Heflin, who had voted against his judicial appointment.

Sessions, now with two decades in the U.S. Senate, brings to the table experience in Washington, a resume Trump lacks. But Sessions, who does not hold a committee chairmanship, has not wielded the clout of some other Republican senators.

Marty Connors, a former state GOP chairman, said what Sessions does offer are "conservative credentials" to conservative Republican voters harboring doubts about Trump.

"The thing about Jeff is, he's a Boy Scout," Connors said. "What Jeff would do is bring conservative credentials to all those swing states."