DENVER — After four days of testimony, a federal judge on Friday dropped Taylor Swift from a suit filed by a radio host who took the star to court claiming she had falsely accused him of groping her.

“Taylor Swift did not act improperly,” Judge William J. Martínez said in United States District Court in Denver. He said David Mueller, the former host of a radio program here, offered “insufficient evidence Miss Taylor Swift acted improperly when she reported an assault she truly believed happened.”

The judge’s ruling stopped short of saying the groping had occurred, as Ms. Swift had testified in a dramatic turn on the witness stand Thursday. But the judge said there was not enough evidence to proceed as far as giving the case to a jury.

Ms. Swift smiled broadly at the news and people at her table — including her mother, Andrea; one of her managers, Frank Bell; and her lawyers — embraced.