A 26-year-old pizza cook was charged Friday with phoning in the bogus terrorism tip that rerouted a Texas-bound US Airways flight back to Philadelphia on Thursday under a national spotlight.

It wasn't the charges against Kenneth W. Smith Jr. that were compelling as much as the story behind them. Smith, authorities said, was entangled in a 21st-century love triangle, a text-message and Facebook war of words with his girlfriend's former beau that spiraled into a federal crime.

When the ex-boyfriend, identified as Christopher Shell, posted a "compromising" photo of the unnamed woman on Facebook, Smith decided to "avenge" her, according to an affidavit filed in the case.

Smith told agents he walked to a pay phone Thursday morning and, using a fake name, called Philadelphia International Airport police to report that Shell was smuggling liquid explosives onto a flight to Dallas that morning, the affidavit states.

The plane, with 74 passengers and crew members, was diverted back to Philadelphia, where cameras snapped and Twitter feeds crackled as officials evacuated the jet and removed Shell in handcuffs before determining that he was the victim of a hoax.

Shell, a 29-year-old South Philadelphia resident who had been trying to get home to Texas on his birthday, told investigators "his ex-girlfriend and her boyfriend, Kenny," were probably behind the call, according to the affidavit from Special Agent David L. O'Brien of the Bureau of Alcohol, Tobacco, Firearms and Explosives.

Agents found Smith at his job and confronted him, and he later confessed, the filing says. They have not identified or charged his girlfriend.

On Friday afternoon, Smith appeared in handcuffs and green prison garb before U.S. Magistrate Judge Henry S. Perkin.

Smith said nothing during the brief proceeding except to acknowledge that he did not own a handgun or passport and that he works at Three Brothers Pizza & Pasta in the city's Port Richmond section.

Perkin freed him on $250,000 bail, but ordered him to submit to drug testing and have daily contact with pretrial services officers. He was charged with falsely reporting a threat against an airplane, an offense punishable by up to 10 years in prison.

An hour or so later, Smith strode from the federal courthouse with his lawyer, William J. Brennan, but declined to discuss the case.

Brennan said Smith was shocked and "very embarrassed" by the attention to the case. He described his client as a hardworking Philadelphia native who works at least 60 hours a week as a pizza cook and who has never before been charged with a serious crime.

Brennan said he had seen the Facebook photo that allegedly led to the bogus terrorism tip. He declined to describe it except to say, "It's the kind of photo that could incense a boyfriend."

Prosecutors have a month to indict Smith or work out a plea or resolution. Assistant U.S. Attorney Jennifer Arbittier Williams declined to comment as she left the courtroom.

Shell, who declined or ignored interview requests after his 15 minutes of infamy on Thursday, was arrested later that night when he finally landed in Texas. Authorities there had outstanding warrants for him related to drug-possession charges. Shell was released from the Collin County Jail on Friday afternoon after posting a $3,445 cash bond.

The owner of the pizzeria declined to talk at length with reporters Friday. But when asked whether Smith would be returning to his job, owner Leo Berardi said, "Absolutely not."

Contributing to this article were Inquirer staff writers Peter Mucha, Robert Moran, and Joseph A. Gambardello.