PHILADELPHIA — A federal judge on Monday sentenced a Pennsylvania woman to 10 years in prison for her part in a plan to murder a Swedish cartoonist whose images of the Prophet Muhammad offended Muslims.

The woman, Colleen R. LaRose, who used “Jihad Jane” as an online alias, pleaded guilty to four charges, including conspiring to aid terrorists and to kill a person in a foreign country, after she plotted with jihadists she encountered on the Internet to kill the cartoonist, Lars Vilks, who depicted the prophet atop the body of a dog.

Ms. LaRose, 50, of Pennsburg, Pa., near Philadelphia, went to Europe in 2008 with the intention of killing Mr. Vilks, but failed to meet up with the people who had encouraged the mission. She returned to the United States and was arrested after the plan was discovered.

Judge Petrese B. Tucker of United States District Court said Monday that she was satisfied that Ms. LaRose would have carried out the killing if she had made the right contacts.