President-elect Donald Trump has named longtime ally US Senator Jeff Sessions to become his attorney general.

But allegations of racism that have dogged Mr Sessions’ career could make for an uncomfortable Senate confirmation hearing.

The right-wing, anti-illegal immigration senator from Alabama was one of Mr Trump’s earliest supporters in his White House bid.

As a fervent supporter, he was a senior adviser to the New York tycoon on politics, national security and policy.

He is also one of the vice-chairmen on Mr Trump’s presidential transition team.

KKK joke

At his victory bash in New York, Mr Trump said of Mr Sessions, "he is highly respected in Washington because he is as smart as you get".

Born Jefferson Beauregard "Jeff" Sessions III, the 69-year-old has served as a senator for nearly two decades.

He was Alabama’s attorney general before he joined the Senate in 1996.

He sits on the Senate Armed Services Committee, the Judiciary Committee and the Budget Committee.

The hardline lawmaker, who helped Mr Trump craft his foreign policy plan, was one of the few Republicans to come to Mr Trump’s defence after he proposed a temporary ban on Muslims entering the US.

Mr Sessions said Mr Trump was "treading on dangerous ground", but that it was "appropriate to begin to discuss" the issue.

The senator’s past remarks about race have drawn scrutiny and proved a roadblock in his political career.

A Senate committee denied Mr Sessions a federal judgeship in 1989 after lawmakers heard testimony that he had used a racial slur.

He had also joked about the Ku Klux Klan, saying he thought they were "OK, until he learned that they smoked marijuana".

Mr Sessions was also accused of calling a black assistant US attorney "boy" and telling him to be careful about how he spoke to "white folks".

He denied to the committee ever having called the lawyer "boy" and insisted he had merely advised him to be cautious about what he said to "folks".

Mr Sessions also did not deny claims that he had labelled the National Association for the Advancement of Colored People "un-American" and "communist-inspired".

Immigration hardliner

He has spent much of his career fighting immigration battles, ranging from amnesty bills on creating a path to citizenship for undocumented immigrants to visa programmes for foreign workers.

Mr Sessions supports limiting legal immigration, arguing it protects American jobs.

He also backs Mr Trump’s plan to build a wall along the US-Mexican border.

In a 2005 Washington Post op-ed, he argued that "Legal immigration is the primary source of low-wage immigration into the United States" and that the country needed immigration moderation, "slowing the pace of new arrivals so that wages can rise, welfare rolls can shrink and the forces of assimilation can knit us all more closely together".

Much of his strident views on immigration were laid out last year in his 25-page manifesto, "Immigration Handbook for the New Republican Majority".

In the report, he argues immigration was responsible for job loss and welfare dependency and called claims by tech entrepreneurs that immigrant workers with elite skills were part of the innovation process a "hoax".

Mr Sessions has also challenged the past two Democratic attorney generals on whether terror suspects have the right to be tried in civilian court as well as the closure of the detention facility at Guantanamo Bay.

He also supports the attorney general’s right to block a directive from the president if it is legally questionable.