Senior Democrat senators including Bernie Sanders and Elizabeth Warren have introduced a bill to prevent Donald Trump creating a “Muslim registry”.

The new law would ban government agencies setting up any kind of programme that required people to “register or check in” on the basis of religion, race, ethnicity or national origin. It would also prevent federal funds being used to set up such a system.

Mr Trump has previously said he is considering introducing a “registry” of Muslim immigrants in the USA. Asked about the issue in November 2015, he said: “I would certainly implement that”.

He also pledged to impose a ban on Muslims entering the country but has since modified this to apply only to people coming from countries with “a proven history of terrorism”.

The new bill was introduced by Cory Booker, a New Jersey senator and former Mayor of Newark, and backed by a number of leading Democrats. It will only pass through the Senate if it gets the backing of 60 senators, including at least 12 Republicans.

The wording of the bill states government departments “may not create or implement a law enforcement or national security program that requires, or has the effect of causing, people to register or check in on the basis of religion, race, age, gender, ethnicity, national origin, nationality, or citizenship; and… no Federal funds may be used to create or implement an immigration registry or check-in program.”

Mr Booker said: “Forcing people to sign up for a registry based on their religion, race…undermines the freedom of religion guaranteed by our Constitution and promote[s] the false notion that people of certain faiths and nationalities are inherently suspect.

“Our legislation would block Donald Trump and subsequent administrations from infringing on religious liberty by creating an immigration-related religious registry.”

President Trump protests Show all 20 1 /20 President Trump protests President Trump protests Patrons hold a sign as people march by while protesting the election of Republican Donald Trump as the president of the United States in downtown Los Angeles, California Reuters President Trump protests Demonstrators rally following the election of Republican Donald Trump as President of the United States, in Oakland, California Reuters President Trump protests Demonstrators march following the election of Donald Trump as President of the United States Reuters President Trump protests Thousands of protesters rallied across the United States expressing shock and anger over Donald Trump's election, vowing to oppose divisive views they say helped the Republican billionaire win the presidency AFP/Getty Images President Trump protests Demonstrators protest outside the Chicago Theatre in Chicago, Illinois Getty President Trump protests A police officer aims a launcher after demonstrators threw projectiles toward a line of officers during a demonstration in Oakland, California Reuters President Trump protests An officer examines a vandalized police vehicle as demonstrators riot in Oakland, California Reuters President Trump protests Demonstrators take over the Hollywood 101 Freeway just north of Los Angeles City Hall in protest against the election of Republican Donald Trump as President of the United States Reuters President Trump protests A woman holds up a sign reading 'Trump you are an Idiot' as demonstrators gather during a protest against President-elect Donald Trump outside the City Hall building in Los Angeles, California EPA President Trump protests A masked demonstrator gestures toward a police line during a demonstration in Oakland, California Reuters President Trump protests Demonstrators protest against the election of Republican Donald Trump as President of the United States, near the Trump International Hotel & Tower in Las Vegas, Nevada Reuters President Trump protests Musician Lagy Gaga stages a protest against Republican presidential nominee Donald Trump on a sanitation truck outside Trump Tower in New York City Getty President Trump protests A woman yells as she takes part in a protest against President-elect Donald Trump in Seattle's Capitol Hill neighborhood AP President Trump protests A man dressed in red-white-and-blue sits on the curb during a protest against President-elect Donald Trump in Seattle's Capitol Hill neighborhood AP President Trump protests A protester sets off fireworks during a protest against President-elect Donald Trumpin Seattle's Capitol Hill neighborhood AP President Trump protests University of California, Davis students protest on campus in Davis, California, U.S. following the election of Donald Trump as President of the United States Reuters President Trump protests An Oakland police officer checks out damage after a window was broken by protesters at a car dealership in downtown Oakland, Calif AP President Trump protests A protester faces a police line in downtown Oakland, Calif AP President Trump protests President-elect Donald Trumpís victory set off multiple protests AP President Trump protests A fire burns during protests in Oakland, Calif AP

Elizabeth Warren, a prominent left-wing Massachusetts senator who has been tipped to run for president in 2020, said: “Targeting people based on their religion flies squarely in the face of who we are as Americans – and it makes our country less safe. This bill will uphold American values and ensure the federal government cannot engage in surveillance or harassment of certain immigrant groups.”

Mr Trump has argued that action against Muslim immigration to the US is needed to combat terrorism. He said a registry would help because it would be “good management”.

Asked by NBC whether Muslims would be legally obliged to register on the database, the Republican replied: “They have to be, they have to be”.

The Obama Administration has already taken steps to try to prevent Mr Trump establishing a "Muslim registry".

Last month it closed down a dormant programme that, until 2011, had been used to register people who entered the US from countries with active terrorist groups.