An acclaimed children’s book author has turned down an invitation to be honored by the Texas legislature, citing a bill introduced in the state’s Senate last week that aims to control which bathrooms transgender people are allowed to use in the state.

Introduced Thursday, Senate Bill 6 would prevent most transgender Texans from using public restrooms that correspond with their gender identity.

Rick Riordan, author of the best-selling Percy Jackson and the Olympians fantasy series for young adults, tweeted Friday that he would not attend an event at the state capitol building seeking to honor him as a Texas author.

In the tweet, he linked to an article posted by the American Civil Liberties Union about the proposed legislation.

“If they want to honor me, they could stop this nonsense,” Riordan tweeted.

Riordan grew up in San Antonio and graduated from the University of Texas at Austin, but he now lives in Massachusetts. He has written numerous books for children, as well as some adult mystery novels, but he is best known for his Greek-mythology-rooted series about a boy named Percy Jackson. The series has sold tens of millions of copies worldwide, has been translated into more than three dozen languages and has so far been adapted into two movies.

Neither Riordan nor his publisher responded to an interview request Monday.

Riordan’s tweet about his decision was shared thousands of times — and met with some backlash of its own, as some threatened to boycott his books.

“Wowsers. Why can’t gifted people be activists without offending their fan base?” one person tweeted in response to the author. “No more of ur books 4 my kids.”

Others thanked him for taking a stand.

Republican state Rep. Jason Villalba, the organizer of the March 8 author event, told The Washington Post that the House of Representatives periodically invites athletes, artists and other prominent Texans to honor them on the House dais. This year, he thought it would be a good idea to recognize Texas authors and their contributions to the state’s culture.

“Of course, funny things happen on the way to session, and this time it seems we’ve gotten caught up in a political proposal from the other chamber,” Villalba said, adding that he did not know why Riordan had declined their invitation until Saturday. “I didn’t find out that it was related to SB6 until the tweet that I read and was quite surprised.”

Villalba said he has not reached out to Riordan to try to persuade him to change his mind.

“I’m not one to challenge his positions on that. This is America. We have First Amendment freedoms to speak on any issues we want to speak on,” Villalba said. “We’re disappointed that we won’t get to recognize him, but we respect him greatly.”

Under Senate Bill 6, no Texas public school would be able to institute a bathroom policy that allows transgender students to use a restroom, shower or locker room that doesn’t match their “biological sex” on their birth certificate. The bill would still allow for schools to accommodate transgender students on a case-by-case basis, Republican state Sen. Lois Kolkhorst, who introduced the bill along with the state’s lieutenant governor, told the Texas Tribune.

However, “public entities” that violate the law would be subject to a fine, Kolkhorst added.

The Texas legislation was championed by the state’s conservative lawmakers, who touted it as a measure to protect privacy and argued that local nondiscrimination ordinances allowed men to use women’s restrooms.

“This issue is not about discrimination — it’s about public safety, protecting businesses and common sense,” Texas Lt. Gov. Dan Patrick (R) said in a statement when the bill was filed last week.

However, advocacy groups denounced the proposal as discriminatory almost as soon as it was announced. Equality Texas, a nonprofit group that advocates for the fair treatment of the lesbian, gay, bisexual and transgender community, called the bill a “shameful attack on transgender kids” in its campaign to stop the legislation.

“This proposed legislation is not about adding protection; instead it is an all out attempt to codify discrimination against transgender Texans. Plain and simple,” the group said in a statement. “If legislators were concerned with stopping sexual predators, they should introduce laws aimed at them, not transgender individuals.”

The Human Rights Campaign called it a “dangerous, politically-motivated assault on the rights of [Patrick’s] own constituents.”

“Patrick and his anti-LGBTQ friends in the legislature have clearly learned nothing from the self-inflicted damage caused by North Carolina’s discriminatory HB2 law and want to throw away $8.5 billion in revenue from lost visitors, businesses, sports leagues and major entertainment groups,” HRC president Chad Griffin said in a statement. “If lawmakers vote to discriminate against transgender people, Texas will be closed for business.”

The proposed Texas legislation is similar to a controversial law passed in North Carolina last year, under which transgender people must use the restroom that matches the “biological sex” on their birth certificate.

Its passage prompted widespread protests and boycotts of the state. Both the NBA and the NCAA ditched plans to hold special games and tournaments in North Carolina, causing a potential loss of more than $100 million in tourism revenue, CBNC reported.

Last month, North Carolina lawmakers convened a special legislative session to rescind the law but failed to do so.

Read more: