San Francisco Mayor Ed Lee died early on Tuesday, local media reported.

Lee's cause of death was not immediately released, but sources told the San Francisco Examiner that Lee suffered a heart attack while shopping at a Safeway grocery store in the Sunnyside neighborhood.

The 65-year-old was taken to Zuckerberg San Francisco General Hospital where he was pronounced dead around 1.15am local time, surrounded by his friends and family, according to a statement from his office.

'It is with profound sadness and terrible grief that we confirm that Mayor Edwin M. Lee passed away,' the statement said. 'Our thoughts and prayers are with his wife Anita, his two daughters, Brianna and Tania, and his family.'

San Francisco Mayor Ed Lee suddenly died early Tuesday morning, according to local media. He was 65

Lee became the city's mayor in 2011, when he was appointed by the Board of Supervisors to fill the mayoral seat vacated by Gavin Newsom, who went on to become lieutenant governor.

While he was initially reluctant to hold the seat, Lee did eventually decide to run for for the seat, which he won in November 2011. He then went on to win re-election in 2015.

Lee was the 43rd mayor of San Francisco and the first elected mayor of Chinese descent in a city steeped in Chinese American history. About a third of the San Francisco population is Asian.

Lee is pictured above with his wife Anita, left, and daughters Tania, left, and Brianna, right, on November 8, 2011 - the day he won his first mayoral election

Lee, pictured at the Pride Parade in June, was the city's first Asian-American mayor. About a third of the city is of Asian descent

Upon Lee's death, Board of Supervisors President London Breed becomes the mayor of the city of more than 850,000 people, the San Francisco Chronicle reported.

Lee was a former civil rights lawyer who served as director of San Francisco's Human Rights Commission from 1991 to 1996 and as city administrator from 2005 to 2011.

He had been in the news lately as one of President Trump's toughest critics on immigration, and a leading member of the Sanctuary City movement.

David Ho, a community organizer, told the Examiner that he was 'stunned' and 'shocked' by the loss of Lee.

'At the end of the day, Ed was a consummate community leader, father, mentor,' Ho said. 'He cared for the people of this city.'

Lee was born in 1952 in Seattle, Washington to parents who immigrated to the U.S. from Taishan, Guangdong Province, China in the 1930s. His father Gok Suey fought in the Korean War, worked as a cook managing a restaurant in Seattle, and died when Lee was 15. Lee's mother Pansy worked as a seamstress and waitress to provide for her son and five other children.

Lee graduated Summa Cum Laude from Bowdoin College in Maine in 1974 and went on to study law at the University of California, Berkeley.