Throughout much of the colonial era, Boston, founded by the Puritans in 1630, was the largest city and preeminent port in British North America, gaining its wealth primarily by shipping and fishing. However, the city was plagued with economic difficulties throughout the middle of the eighteenth century, and by the 1750s New York and Philadelphia had passed Boston in population and wealth. Boston was governed by a town meeting, with a board of selectmen acting as a sort of executive body. Sensitive to imperial intrusion, the city had a long-standing tradition of mob action. These traits ensured that Boston would play a prominent role in the resistance to Great Britain that culminated in the American Revolution.
Boston's European population was overwhelmingly English. Its African population reached a high of 10 percent of the total population of 15,730 in 1752, and remained steady at over 1,000 throughout the Revolutionary era. The total population hovered around 16,000 throughout the middle third of the century, with war and epidemic disease counteracting natural increase and immigration.
In the middle of the eighteenth century Boston was physically a small town. It encompassed a 750-acre peninsula joined to the mainland by an isthmus known as the Neck. It boasted the oldest public school system in the colonies, but the nearest college, Harvard, was across the Charles River in Cambridge, just to the west. The main social pillar was the Congregational Church, with nine congregations by 1800, of which the Brattle Street Church was generally regarded as the most fashionable. Faneuil Hall, the center of the town's civic life, was constructed in 1742 as a public market, but long-standing hostility to such a project turned the building into a meeting hall. Boston made its living off shipping, carrying cod to the West Indies, Spain, and Great Britain, lumber to Great Britain, and finished goods from Europe to the colonies. Attempts at a linen manufactory failed in the 1750s, but the town did engage in some industry, such as distilling rum and manufacturing rope.

State Street, 1801. The square was the site of the Boston Massacre in 1770.
James Otis, a prominent attorney and moderator of town meeting, led the first stage of resistance to British rule. In 1761 he argued against the writs of assistance, and in 1764 he wrote a pamphlet denouncing the Sugar Act. The Stamp Act provoked violent action in 1765, when in August a mob led by Ebenezer MacIntosh sacked the home of stamp commissioner Andrew Oliver and destroyed the home of Oliver's brother-in-law, Lieutenant Governor Thomas Hutchinson. By that year political leadership of the town had passed to Samuel Adams, a member of the Boston Caucus, former tax collector for Suffolk County, and representative in the General Court; and John Hancock, a wealthy merchant. Both were leaders of the Sons of Liberty, secret organizations formed in opposition to the Stamp Act. The repeal of the act brought great celebration to Boston, but Adams warned against complacency.
The Towshend Duties, passed in 1767, brought the Sons of Liberty back into action. On 14 August 1767 they held a rally denouncing this new act. On 4 March 1768, ninety-eight Boston merchants called for the nonimportation of British goods. On 7 April British customs agents boarded the Lydia, owned by John Hancock, but Hancock refused to let them go below. In February the colonial General Court issued a circular letter to the other colonies calling the Townshend Duties unconstitutional. Lord Hillsborough, the colonial secretary, demanded the General Court rescind the letter. In August the House of Representatives voted 92 to 17 to defy the order. Fearing that Boston was in open revolt, the British government sent two regiments of troops, which arrived in October 1768.
The arrival of four thousand British troops into a city of about fifteen thousand ushered in the most violent period of resistance before the outbreak of the American Revolution. To prepare, the town meeting advised stockpiling weapons, ostensibly to be used in case of war with France. When the troops camped on Boston Common, town officials tried to arrest them for vagrancy. When that failed, Bostonians tried to get the soldiers to desert. On 5 September 1769 a customs agent beat James Otis nearly to death. In February 1770 a mob stormed the home of another customs agent, and one Boston youth was killed in the fracas. On 2 March a group of soldiers seeking work went to a ropewalk in the South End, where they clashed with locals.
Each of these small incidents led up to the Boston Massacre of 5 March 1770. That evening about ten soldiers harassed a group of Bostonians. This prompted a larger crowd to turn out to confront the soldiers. By half past eight the crowd had the soldiers pushed back to the barracks, and the first stage of the conflict ended by nine o'clock. Soon after, two boys started taunting a British captain. After being chased off, they went to throw snowballs at the soldiers. One rang the bell of the First Church, bringing another crowd into the street. A private was hit with a club, causing him accidentally to fire his musket, killing Crispus Attucks. The other soldiers began firing, killing two more and shooting two others who would later die of their wounds. The next day, about four thousand gathered at Faneuil Hall in an emergency town meeting. On 13 March Captain Thomas Preston and the soldiers involved were indicted for murder; the Sons of Liberty approved of John Adams and Josiah Quincy as counsel for the defense. The court acquitted Preston on the grounds that he did not give the order to fire and found that the other soldiers acted out of legitimate fear for their lives. By July the last soldiers stationed in Boston had been removed. On the day of the Boston Massacre, Parliament repealed the Townshend Duties, and Boston ended its nonimportation on 12 October 1771.
In order to maintain vigilance, Samuel Adams helped organize the committees of correspondence in 1772. He hoped for a pretext to test how far Great Britain would go to suppress resistance. The Tea Act of 1773, which gave the East India Company a monopoly on the distribution of tea in the colonies, provided that pretext. A mass meeting on 5 November demanded that the tea consignees resign. The first ship, the Dartmouth, arrived on 27 November, and the Beaver and the Eleanor arrived soon after. A meeting of "the Body of the People" on 29 November pressured the master of the Dartmouth to stay out of the port. Governor Hutchinson, however, demanded that the tea be unloaded and the tax paid by 17 December. On 16 December, five thousand Bostonians gathered at the Old South Church to plan action. After learning that Hutchinson would not relent, Samuel Adams adjourned the meeting. Some members of the crowd, disguised as Mohawks, went down to the wharf to destroy the tea. Many of those involved in this action, which came to be known as the Boston Tea Party, were members of the Sons of Liberty, but their exact number and identities are unknown. By nine o'clock that night, ninety thousand pounds of tea worth over £9000 lay in the harbor.
Parliament responded by making an example of Boston. The Intolerable Acts, also known as the Coercive Acts, closed the port of Boston as of 1 June 1774, moved the capitol of Massachusetts to Salem, and ordered that rebels would be brought to Great Britain for trial. To enforce these acts, General Thomas Gage, commander in chief of British forces in North America, arrived as the new governor in May 1774. Four regiments arrived in August, and by the outbreak of war twelve regiments were camped in Boston. In May Samuel Adams drafted a Solemn League and Covenant for another nonimportation but was blocked by a group of eight hundred Boston merchants. The Continental Congress, which convened in September, rallied to Boston's defense.
War might have come at any time. The annual Massacre Day oration in the Old South Church in 1775 nearly turned into an armed clash. On 16 April 1775, Gage received orders to move against the Provisional Congress at Concord. Paul Revere, Samuel Prescott, and William Dawes rode out to warn them. The first British troops left Boston Common by sea early on the morning of 19 April. A relief column marched out through Boston Neck around nine o'clock. The British were turned back at Concord, and by evening were trapped in Boston. On 23 April, Patriots were allowed to leave the city. The British, under General William Howe, attempted to break the siege on 17 June, assaulting the Patriot position on Breed's Hill. After the third assault, the British took Breed's Hill and Bunker Hill, chasing the Patriot army to Cambridge; however, the British sustained heavy losses, and their victory in the Battle of Bunker Hill—which served as a morale booster for the gallant Patriots—failed to break the siege. The Patriots still held the heights around Boston.
General George Washington arrived to take command soon after the battle, and in January 1776 Colonel Henry Knox arrived at Framingham with the cannon from Fort Ticonderoga in New York. In March Washington placed the cannon at Dorchester Heights. Howe, believing he could not hold the city, evacuated Boston on 17 March 1776. Bostonians returned to a ruined city, with the common torn up and houses torn down for firewood. Nevertheless, Boston resumed its place at the center of Massachusetts politics, serving as the site of the state constitutional convention in 1779 and of the federal ratifying convention in 1788.

The Bloody Massacre. This famous engraving of the Boston Massacre by Paul Revere, after a sketch by Henry Pelham, was issued on or about 28 March 1770. The image helped ignite public outrage after it was copied and widely distributed throughout the colonies.

Plan of Boston. This plan of the town and harbor of Boston and the surrounding countryside, made by J. De Costa in 1775, shows the road from Boston to Concord, the site of an early engagement between British and American forces.
The task of rebuilding the city fell to the architect Charles Bulfinch, a member of the Board of Selectmen from 1791 to 1795 and again from 1799 to 1817. During that time he redesigned Boston's public and private spaces. His two most famous public buildings were the new State House and the reconstruction of Faneuil Hall. The State House was built on land on Beacon Hill that had belonged to the painter John Singleton Copley. The top third of the hill was torn down and used for fill in the Mill Pond and other places. Paul Revere and Samuel Adams laid the cornerstone on 4 July 1795, and the building was completed in January 1798. The new State House transformed grazing land on the fringe of the city to the political center of the state and the most fashionable neighborhood in the city. In 1805 Bulfinch doubled the size of Faneuil Hall and added a third story. Bulfinch also built homes for Boston's mercantile and political elite, including three houses for Harrison Gray Otis, a nephew of James Otis and a leading figure at the Hartford Convention in 1814.
Politically, Boston was solidly Federalist. All of Boston's congressmen from 1788 to 1828 were Federalists, and Democratic Republican candidates for governor carried Boston only twice. Economically, Boston thrived on overseas trade, exporting fish, whale oil, and lumber. Frederick Tudor pioneered the export of ice. Boston also provided the ships to carry products from other states and the West Indies to Europe. Beginning in the 1780s, Boston merchants traded with Asia, particularly China. Thomas Handasyd Perkins was Boston's leading merchant, and by 1825 he was the largest American opium trader in China. The Embargo of 1807 hit Boston particularly hard, fueling opposition to President Thomas Jefferson and his secretary of state, James Madison. The end of the Napoleonic Wars closed off much of the old shipping business.
In 1813 Francis Cabot Lowell and Nathan Appleton founded the Boston Manufacturing Company, which built textile mills in Waltham and the Merrimack Valley. The Boston Associates, as they were known, launched the industrial revolution in the United States. Daniel Webster, who moved to Boston in 1816, served as their advocate in Congress.
By the early nineteenth century, Boston's physical setting and population outgrew its form of government. In the 1790 census Boston's population was 18,038; in 1810 it was 33,787; in 1820, it had grown to 43,298; and in 1830 the population reached 61,392. Physically, the city expanded onto reclaimed land in the North End and along the waterfront, and in 1804 annexed Dorchester Heights, renamed South Boston. After 1776 several proposals to replace town meeting with a mayoral system failed. In 1820 some eight thousand people were eligible to attend town meeting, but few did so, and those who arrived first tended to dominate. A split in Boston's Federalists accelerated change. The Central Committee, led by Harrison Gray Otis, represented Federalist orthodoxy. Josiah Quincy broke with the Federalists over the admission of Maine as a state, and forged a movement of dissident Federalists and Republicans. The Central Committee reluctantly embraced the move for a new charter, approved by town meeting on 7 January 1822, in order to control the process.
In the first mayoral election, Otis faced Quincy, leader of the "Middling Interest." Neither could win a majority, and both agreed to a compromise candidate, John Phillips. The next year Quincy won the first of his six one-year terms, during which he consolidated the powers of the old town boards into the mayor's office, eventually absorbing the functions of the school department and using a disastrous fire on Broad and State Streets as an opportunity to abolish the old fire wards and establish a professional fire department in 1825. In 1826 he built a new market near Faneuil Hall, now called Quincy Market. As Quincy accumulated power he also accumulated enemies; in 1828 Otis defeated him for reelection and went on to serve as mayor until 1831. He planned to use the mayor's office as a stepping-stone to the governor's office but never succeeded. His most durable legacy was the banishment of cows from Boston Common in 1830.