A YouTube star has bought an American town and renamed it “Gay Hell” to troll Trump policy on flying the Pride flag.

Prankster Elijah Daniel purchased Hell, Michigan, on June 17 to rename it for three days in protest of the U.S. State Department’s ban on flying the Pride flag at American embassies.

Some U.S. embassies were denied permission by the Trump administration to fly the rainbow flag to mark LBGTQ Pride month, according to CNN.

“Ahead of Pride month Trump’s administration put a ban on embassies flying Pride flags,” Daniel tweeted June 17.

“So as of today, I am now the owner of Hell, Michigan. I bought the whole town. And my first act as owner, I have renamed my town to Gay Hell, MI.

“The only flags allowed to fly are pride.”

In 2017, Daniel was also Mayor of Hell and banned heterosexual people in the town as a stunt, CNN reports.

Anyone can pay to be Mayor of Hell for the day from $100, according to gotohellmi.com -- “Hell, Michigan’s Official Website.”

Temporary mayors get a raft of merchandise including a proclamation of impeachment for the end of their term.

Hell was handed over to Daniel by its owner John Colone.

Colone bought up most of the businesses there 20 years ago after selling a Chrysler dealership nearby.

He now runs the town’s website where customers can buy T-shirts and other Hell-themed gifts.

Visitors can get married in Hell, buy a gift from Screams Souvenirs, eat at the Hell Hole Diner or quench their thirst at the Hell Saloon.

He told CTVNews.ca that he sold the town to Daniel for a “smile and a handshake.”

“We came into work at nine to 67 orders of T-shirt in the gay pride colours with the words, ‘Everyone’s welcome in Hell,’” the Vietnam veteran told CTVNews.ca.

“Everybody is welcome here. We don’t have a problem with it. We’ve had a number of same-sex marriages in our chapel and we had a group of transgender people spend a fun time here recently.

“We get thousands of visitors.”

Reaction to Daniel’s latest “joke” has been mixed.

“A ban? Ummm.. no. They simply said the American embassy should fly the flag of our country,” talk show host Joe Pagliarulo tweeted.

“Why are you anti-American Flag? Why are you so filled with hate? Stop hating the flag. Disgusting.”

Daniel, 25, lives in California and has more than 500,000 YouTube subscribers and more than 625,000 followers on Twitter.

“As a part time Michigan resident myself, I'd love to buy some land in Gay Hell!,” fellow YouTube sensation Jeffree Star tweeted.

“A cute pink mansion on a hill, nothing too fancy?”

The town is about 24 kilometres northwest of Ann Arbor and has a population of 72 people, according to Colone.

The newly-rebranded town is a five acre commercial property and was on the market for US$900,000 in 2016, the Detroit Free Press reported at the time