Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

This was no joke.

Comedian and former "Silicon Valley" star T.J. Miller appeared in federal court Tuesday for allegedly calling in a fake bomb threat involving an Amtrak train traveling out of Washington.

The 36-year-old actor, who was arrested Monday night at LaGuardia Airport in New York, faces charges of intentionally providing false information to authorities for claiming there was an explosive device on a train passing through New York's Penn Station and Connecticut on March 18, the U.S. Attorney's Office said.

Miller faces up to five years in prison if found guilty. A judge in New Haven, Connecticut, allowed him released on $100,000 bond.

Federal prosecutors said Miller called 911 to report a female passenger who "has a bomb in her bag," and described the woman with brown hair and a scarf. When Amtrak investigators were alerted, the train was in Connecticut and forced to stop at a station in Westport.

A bomb squad conducted a search of the train, but found no evidence of an explosive.

T.J. Miller performs during the 22nd Annual Critics' Choice Awards on Dec. 11, 2016, in Santa Monica, Calif. Christopher Polk / Getty Images for The Critics' Choice Awards file

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Investigators traced the initial call to Miller, who got off the train in New York City. He allegedly told officials that the woman had red hair and a red scarf, and was holding a "black bag carry on suitcase with a handle," according to the complaint.

Miller said the woman appeared to want to get off the train without the suitcase, according to prosecutors.

The actor was slurring his words, but said he had only one glass of red wine and responded "no" when asked if he had a mental illness, prosecutors added.

"This is the first time I've ever made a call like this before," Miller told investigators, according to the complaint. "I am worried for everyone on that train. Someone has to check that lady out."

But investigators determined that Miller was on a different train than the one that was first stopped.

After speaking with an attendant on the train on which Miller actually traveled, they were told he appeared drunk when he boarded in Washington and consumed multiple drinks. He was ordered off in New York because he was intoxicated, prosecutors said.

They added that Miller got into hostile exchanges with a woman sitting in a different row in his First Class car.

That woman was later interviewed and found not to have explosives — and Miller's actions were motivated by his "grudge" against her, prosecutors said.

An attorney for Miller could not immediately be reached for comment Tuesday.

Miller made headlines late last year after allegations resurfaced about him sexually assaulting a woman when he was in college. He strongly denied the accusation.

He left HBO's "Silicon Valley" last year after four seasons for what were described at the time as creative differences with the show's producers.

Miller currently co-stars in the Stephen Spielberg sci-fi film, "Ready Player One." He made no mention of the arrest Tuesday on social media, instead tweeting about an upcoming comedy show in Philadelphia.