Mary Dyer is hanged for defying a law banning Quakers from the Massachusetts Bay Colony.

The Massachusetts Bay Colony (16301691), more formally The Colony of Massachusetts Bay, was an English settlement on the east coast of America around the Massachusetts Bay, the northernmost of the several colonies later reorganized as the Province of Massachusetts Bay. The lands of the settlement were in southern New England, with initial settlements on two natural harbors and surrounding land about 15.4 miles (24.8 km) apartthe areas around Salem and Boston, north of the previously established Plymouth Colony. The territory nominally administered by the Massachusetts Bay Colony covered much of central New England, including portions of Massachusetts, Maine, New Hampshire, and Connecticut.

The Massachusetts Bay Colony was founded by the owners of the Massachusetts Bay Company, including investors in the failed Dorchester Company, which had established a short-lived settlement on Cape Ann in 1623. The colony began in 1628 and was the company's second attempt at colonization. It was successful, with about 20,000 people migrating to New England in the 1630s. The population was strongly Puritan and was governed largely by a small group of leaders strongly influenced by Puritan teachings. It was the first slave-holding colony in New England, and its governors were elected by an electorate limited to freemen who had been formally admitted to the local church. As a consequence, the colonial leadership showed little tolerance for other religious views, including Anglican, Quaker, and Baptist theologies.

The colonists had good relationships with the local Indians, however they did join their neighbor colonies in the Pequot War (163638) and King Philip's War (167578). After which most of the Indians in southern New England made peace treaties with the colonists or were sold into slavery after King Philips's War (apart from the Pequot tribe, whose survivors were largely absorbed into the Narragansett and Mohegan tribes following the Pequot War).The Massachusetts Bay Colony was economically successful, trading with England, Mexico and the West Indies. In addition to barter, transactions were done in English pounds, Spanish "pieces of eight", and wampum in the 1640s. A shortage of currency prompted the colony to call on the respected John Hull to establish a mint and serve as mintmaster and treasurer in 1652. The Hull Mint produced oak tree, willow tree, and pine tree shillings.

Political differences with England after the English Restoration led to the revocation of the colonial charter in 1684. King James II established the Dominion of New England in 1686 to bring all of the New England colonies under firmer crown control. The Dominion collapsed after the Glorious Revolution of 1688 deposed James, and the Massachusetts Bay Colony reverted to rule under its revoked charter until 1691, when a new charter was issued for the Province of Massachusetts Bay. This new province combined the Massachusetts Bay territories with those of the Plymouth Colony and proprietary holdings on Nantucket and Martha's Vineyard. Sir William Phips arrived in 1692 bearing the charter and formally took charge of the new province.

Mary Dyer (born Marie Barrett; c. 1611 – 1 June 1660) was an English and colonial American Puritan turned Quaker who was hanged in Boston, Massachusetts Bay Colony, for repeatedly defying a Puritan law banning Quakers from the colony. She is one of the four executed Quakers known as the Boston martyrs.

Dyer's birthplace has not been established, but it is known that she was married in London in 1633 to William Dyer, a member of the Fishmongers' Company but a milliner by profession. Mary and William were Puritans who were interested in reforming the Anglican Church from within, without separating from it. As the English king increased pressure on the Puritans, they left England by the thousands to go to New England in the early 1630s. Mary and William arrived in Boston by 1635, joining the Boston Church in December of that year. Like most members of Boston's church, they soon became involved in the Antinomian Controversy, a theological crisis lasting from 1636 to 1638. Mary and William were strong advocates of Anne Hutchinson and John Wheelwright in the controversy, and as a result, Mary's husband was disenfranchised and disarmed for supporting these "heretics" and also for harboring his own heretical views. Subsequently, they left Massachusetts with many others to establish a new colony on Aquidneck Island (later Rhode Island) in Narraganset Bay.

Before leaving Boston, Mary had given birth to a severely deformed infant that was stillborn. Because of the theological implications of such a birth, the baby was buried secretly. When the Massachusetts authorities learned of this birth, the ordeal became public, and in the minds of the colony's ministers and magistrates, the monstrous birth was clearly a result of Mary's "monstrous" religious opinions. More than a decade later, in late 1651, Mary Dyer boarded a ship for England, and stayed there for over five years, during which time she converted to Quakerism. Because Quakers were considered among the most dangerous of heretics by the Puritans, Massachusetts enacted several laws against them. When Dyer returned to Boston from England, she was immediately imprisoned and then banished. Defying her order of banishment, she was again banished, this time upon pain of death. Deciding that she would die as a martyr if the anti-Quaker laws were not repealed, Dyer once again returned to Boston and was sent to the gallows in 1659, having the rope around her neck when a reprieve was announced. She returned once more to Boston the following year and was then hanged - the third of four Quaker martyrs.