Media playback is unsupported on your device Media caption Paul Ryan has criticised Donald Trump's recent comments about a judge overseeing a lawsuit against Trump University

Donald Trump made a "textbook racist comment" when he suggested a Mexican-American judge was biased against him, top Republican Paul Ryan has said.

Mr Ryan, who agreed last week to support Mr Trump's candidacy, said he should withdraw the comments.

Mr Trump said his comments had been "misconstrued" as a broad attack on people of Mexican heritage.

The row came as Democratic candidate Hillary Clinton was reported to have secured her party's nomination.

However, her rival Bernie Sanders said it was too early to call the result.

'Textbook racism'

Mr Trump had said that US District Judge Gonzalo Curiel, who is overseeing a lawsuit against the now defunct Trump University, would not treat him fairly because he was a Mexican opposed to his plans to build a wall between the US and Mexico.

"Claiming a person can't do their job because of their race is sort of like the textbook definition of a racist comment. I think that should be absolutely disavowed. It's absolutely unacceptable," said Mr Ryan.

Latest updates: Final countdown in nomination battle

Hillary and Bernie battle in six states

Why women can't get excited about Clinton

Image copyright Reuters Image caption Mr Trump has refused to back down over his comments about Judge Curiel

But Mr Ryan, the House speaker, also defended his continued backing of Mr Trump.

"We have more likelihood of getting our policies enacted with him that we do with her [Hillary Clinton]," he said.

Analysis - Anthony Zurcher, BBC News North America Reporter

Republican officeholders had been swallowing their doubts and falling in line behind Donald Trump in recent weeks. Now, it seems, many of those same politicians are suffering from a severe case of indigestion.

Mr Trump has made plenty of controversial statements over the course of his campaign, but the timing of his remarks on Judge Gonzalo Curiel have party stalwarts scrambling for political cover like never before. Mr Trump is their man now, and they have to answer for his actions.

The Trump campaign team had been quietly promising that the candidate was going to moderate his rhetoric to appeal to a larger swath of the electorate. Instead, it seems he's the same, unbridled man that blitzed through the Republican primaries.

That strategy won him the party's nomination, but Republicans who have been mindful of the need to expand their party's base - particularly to the growing block of Hispanic voters - are now staring down the barrel of potentially long-lasting electoral damage.

Even if Mr Trump's recent assertion that he was "misconstrued" are enough to assuage concerns for the moment, Republicans can't help but wonder what Trump-inspired conflagration will consume them next.

Donald Trump's Hispanic voter 'doomsday'

In a statement, Mr Trump said he was justified in questioning whether he was receiving a fair trial.

On Sunday Mr Trump also said it was possible a Muslim judge might be similarly biased against him because of his call for a temporary ban on Muslims entering the country.

What Republicans are saying about Trump's comments

Senator Mark Kirk: "It is absolutely essential that we are guided by a commander-in-chief with a responsible and proper temperament, discretion and judgment. After much consideration, I have concluded that Donald Trump has not demonstrated the temperament necessary to assume the greatest office in the world."

Senator Ted Cruz: "It's inappropriate to be attacking a federal judge's race or ethnicity. You're going to have to ask Donald to explain the reason he says the things he does. I'm not going to try to do so."

Senator Marco Rubio: "That man is an American, born in the US, a judge who has earned that position. I don't think it reflects well in the Republican party. I don't think it reflects well on us as a nation. I ran for president and I warned this was going to happen."

Ohio Governor John Kasich tweeted: "Attacking judges based on their race &/or religion is another tactic that divides our country. More importantly, it is flat out wrong. @realDonaldTrump should apologize to Judge Curiel & try to unite this country."

Representative Jason Chaffetz: "People are disturbed that you would want to try to dismiss a judge based on his ethnicity."

Newt Gingrich: Mr Gingrich called the comments "inexcusable" and "one of the worst mistakes Trump has made".

Senate Majority Leader Mitch McConnell: "I couldn't disagree more with what he had to say. I don't agree with what he had to say. This is a man who was born in Indiana. All of us came here from somewhere else."

Senator Bob Corker: "I think that he's going to have to change. I'm not talking about him necessarily changing his views, but I think that he's moving into a different phase, he's talking to the right people."

Senator Susan Collins: "Mr Trump's comments demonstrate both a lack of respect for the judicial system and the principle of separation of powers."

Senator Ben Sasse: "Public Service Announcement: Saying someone can't do a specific job because of his or her race is the literal definition of 'racism'."