Mary Dyer fought a running battle with the religious authorities in colonial New England throughout much of her adult life.
In 1637, when Mary was in her early twenties, she heard and accepted the preaching of Anne Hutchinson. She became involved in organising illegal Bible studies with Hutchinson and as a result she (and her husband) were banished from Massachusetts Colony; they settled in Rhode Island, where they became companions of Roger Williams, who famously agitated for religious freedom in the colonies. They traveled to England in the 1650s, where Mary stayed after her husband returned home. She became a Quaker after meeting the founder of the Quakers, George Fox.
She returned to Boston, where a law had been passed outlawing Quakers. Mary was again arrested and banished. Soon afterwards, we find her in New Haven, CT, preaching Quaker doctrines to anyone who would listen. Another arrest followed. Undaunted, she heard of two Quakers in prison in Massachusetts and, in obedience to the Biblical command, set out to visit them. For a third time, she was banished from the colony.
She and others refused to accept the authority of the colonial government to banish them, and returned again. This time, she was sentenced to death. Two of her colleagues were executed, but she was reprieved. She traveled a little, preaching in Long Island, NY, amongst other places. She felt God calling her back to Boston, however, and obeyed the call. In 1660 she returned again to Massachusetts, where she was arrested and, on 1st June, hanged for being a Quaker, the third of four Quaker martyrs killed in Boston.
(Background details on Mary Dyer can be found here)