You will be given a definition of a task first, then some input of the task.
In this task, you're given passages that contain mentions of names of people, places, or things. Some of these mentions refer to the same person, place, or thing. Your job is to write questions that evaluate one's understanding of such references. Good questions are expected to link pronouns (she, her, him, his, their, etc.) or other mentions to people, places, or things to which they may refer. Do not ask questions that can be answered correctly without understanding the paragraph or having multiple answers. Avoid questions that do not link phrases referring to the same entity. For each of your questions, the answer should be one or more phrases in the paragraph, and it should be unambiguous.

Passage: The earliest archaeological evidence of human habitation of the territory of the city of San Francisco dates to 3000 BC. The Yelamu group of the Ohlone people resided in a few small villages when an overland Spanish exploration party, led by Don Gaspar de Portolà, arrived on November 2, 1769, the first documented European visit to San Francisco Bay. Seven years later, on March 28, 1776, the Spanish established the Presidio of San Francisco, followed by a mission, Mission San Francisco de Asís (Mission Dolores), established by the Spanish explorer Juan Bautista de Anza.
Upon independence from Spain in 1821, the area became part of Mexico. Under Mexican rule, the mission system gradually ended, and its lands became privatized. In 1835, Englishman William Richardson erected the first independent homestead, near a boat anchorage around what is today Portsmouth Square. Together with Alcalde Francisco de Haro, he laid out a street plan for the expanded settlement, and the town, named Yerba Buena, began to attract American settlers. Commodore John D. Sloat claimed California for the United States on July 7, 1846, during the Mexican–American War, and Captain John B. Montgomery arrived to claim Yerba Buena two days later. Yerba Buena was renamed San Francisco on January 30 of the next year, and Mexico officially ceded the territory to the United States at the end of the war. Despite its attractive location as a port and naval base, San Francisco was still a small settlement with inhospitable geography.
The California Gold Rush brought a flood of treasure seekers (known as "forty-niners", as in "1849"). With their sourdough bread in tow, prospectors accumulated in San Francisco over rival Benicia, raising the population from 1,000 in 1848 to 25,000 by December 1849. The promise of great wealth was so strong that crews on arriving vessels deserted and rushed off to the gold fields, leaving behind a forest of masts in San Francisco harbor.
Output:
What area became part of Mexico in 1821?