Actor Kal Penn has turned a nasty comment about his origins into an inspiring cause as he raised more than $160,000 in a few hours for Syrian refugees.

The Harold and Kumar star who went on to become an associate director in the White House Office of Public Engagement, tweeted a picture of a vile comment on his Instagram account which read: “You don’t belong in this country you f***ing joke”.

But Penn, who was born to Indian parents in the state of New Jersey, tweeted the picture with a link to a fundraising page, he created under the name “donating to Syrian refugees in the name of the dude who said I don’t belong in America”.

“We are better than the hateful people who tell us we don't belong in our own country, that America can't be a beacon of freedom and hope for refugees from around the world. We will turn their bigotry, along with the President's, into love,” he wrote on the crowdfunding page.

His post went viral on social media and only half an hour after the page was created, $5,000 (£4,000) had already been donated.

Within a few hours, he smashed his $25,000 (£20,000) target.

“This is some serious love! Let’s keep going,” he tweeted.

He increased his goal to $50,000 (£40,000) and less than a day after creating the page, he has raised $167,090 (£133,000) and counting.

Now Mr Penn is hoping to hit $250,000 (£200,000) within 24hours.

Donald Trump announces a ban on refugees and all visitors from Muslim-majority countries

The money will be donated to the International Rescue Committee, which supports refugees around the world.

“Look how big your hearts are. Let’s go huge!” he tweeted.

Some of the donors came with inventive names to support the cause, including: “Kumar Fights Racial Profiling”, “#Saynotobigotry”, “All We Need Is Love” and “Born In The USA”.