Given the task definition, example input & output, solve the new input case.
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.
Example: Passage: Nearing London, Oliver encounters Jack Dawkins, a pickpocket more commonly known by the nickname the "Artful Dodger", and his sidekick, a boy of a humorous nature named Charley Bates, but Oliver's innocent and trusting nature fails to see any dishonesty in their actions. The Dodger provides Oliver with a free meal and tells him of a gentleman in London who will "give him lodgings for nothing, and never ask for change". Grateful for the unexpected assistance, Oliver follows the Dodger to the "old gentleman's" residence. In this way Oliver unwittingly falls in with an infamous Jewish criminal known as Fagin, the gentleman of whom the Artful Dodger spoke. Ensnared, Oliver lives with Fagin and his gang of juvenile pickpockets in their lair at Saffron Hill for some time, unaware of their criminal occupations. He believes they make wallets and handkerchiefs.
Output: Who believes Fagin's gang make wallets and handkerchiefs?.
This question is based on the following sentence in the passage "He believes they make wallets and handkerchiefs". It evaluates the understanding that the pronoun "he" refers to name "Oliver". You can ask questions like this one about most pronouns in a paragraph.

New input case for you: 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?