The police on Saturday identified the man who shot and killed Christina Grimmie, a former cast member of the reality TV singing competition “The Voice” and a viral YouTube star, as a 27-year-old man from St. Petersburg, Fla.

The man, Kevin James Loibl, shot Ms. Grimmie in a premeditated attack, the police said, and then killed himself moments later. The shooting happened after a performance by Ms. Grimmie on Friday night in Orlando, and no motive was announced. The authorities said there was no indication the two knew each other.

Ms. Grimmie, 22, had performed with the band Before You Exit at a popular Orlando music venue, The Plaza Live, and was signing autographs for fans and selling merchandise shortly before 10:30 p.m. when the gunman walked up to her and opened fire, the Orlando Police Department said in a statement.

John Mina, the chief of the Orlando Police Department, said Mr. Loibl had traveled to Orlando with two handguns, several loaded magazines and a hunting knife. Police officials were examining his telephone and computer to try to determine a motive.