Image copyright AFP Image caption The first iteration of the travel ban was met by protests across the US

The US Supreme Court has agreed to decide the legality of President Donald Trump's latest travel ban, which targets people from six Muslim-majority countries.

The court is due to hear arguments in April and will rule by the end of June.

But it has already allowed the policy to go into effect while legal challenges continue.

The third version of Mr Trump's directive affects travellers from Chad, Iran, Libya, Somalia, Syria and Yemen.

It also bans travellers from North Korea and certain government officials from Venezuela from entering the US.

Opponents say it is unconstitutional and discriminatory and that in making it Mr Trump has exceeded his legal authority.

But supporters say the president is fulfilling his campaign promises to protect Americans and defend national security.

The Supreme Court, which has a conservative majority, will decide whether the policy is unconstitutional or violates federal immigration law.

In December, the court ruled it could go into full effect even as legal challenges continued in lower courts.

Only liberal Justices Ruth Bader Ginsburg and Sonia Sotomayor would have allowed the president's order to remain blocked.

What about the two previous versions of the ban?

The original order issued last January barred people from seven majority-Muslim countries - Iran, Iraq, Syria, Yemen, Somalia, Sudan and Libya - from entering the US for 90 days.

It also halted refugee resettlement for 120 days and banned Syrian refugees indefinitely.

The travel ban was later blocked by federal courts.

The revised order in March removed Iraq from the list, after it agreed to boost co-operation with the US, and it also lifted the indefinite ban on Syrian refugees.

In June, the Supreme Court allowed that version of the policy to take partial effect.

Meanwhile, Sudan was taken off the list in September.

Media playback is unsupported on your device Media caption Muslim students on Trump ban: 'I don't belong here'

Why were those countries chosen?

The latest travel ban says that the countries "remain deficient at this time with respect to their identity-management and information-sharing capabilities, protocols, and practices. In some cases, these countries also have a significant terrorist presence within their territory".

Critics have noted that major attacks such as the 9/11 New York attacks, the Boston marathon bombing and the Orlando nightclub attack were carried out by people from countries not on the list or by US-born attackers.