NEW YORK — Former Mayor David Dinkins died Monday at the age of 93.

Dinkins shattered racial barriers and made history when he was elected the first Black mayor of New York City in 1989, the crowning jewel of his groundbreaking political career.          

Long before he took over City Hall, a young Dinkins grew up in Trenton, New Jersey, and in Harlem, the son of a businessman and a domestic worker who divorced when he was seven years old.

After high school, he joined the Marines and then went to Howard University, where he majored in mathematics and met his wife, Joyce Burrows, the daughter of a Harlem lawmaker who would become a mentor to Dinkins.      

He graduated from Brooklyn Law School and rose up the ranks of Harlem's political establishment, winning a seat in the state Assembly in 1965. He went on to become  president of the Board of Elections, city clerk and Manhattan borough president, and was a member of Harlem’s legendary group of political powerbrokers later known as the Gang of Four.

In 1989, he challenged Ed Koch in the Democratic primary as the charismatic but tarnished mayor was seeking an unprecedented fourth term.

New York Democratic mayoral candidate David Dinkins makes a point during a news conference in New York City, Nov. 4, 1989. (AP Photo/Frankie Ziths)

Dinkins capitalized on a groundswell of support among African-American voters - many who felt disaffected by the government - and liberal whites who were unhappy with Koch.

The incumbent was dealing with a string of corruption scandals in his administration. And late in the election, the murder of a Black teen, Yusuf Hawkins, by a gang of whites in Bensonhurst stoked racial tensions. Dinkins defeated the mayor by eight percentage points.

He then faced the hard-charging United States Attorney Rudy Giuliani in the general election.

The election was rife with racial overtones, and Dinkins surprisingly only eked out a win by just two points, becoming the city's 106th mayor and making history as the first African American to do so.

But after the hope and optimism of his historic win, Dinkins faced enormous fiscal challenges. The country was in a recession,  and the city had more than a $1 billion budget gap.

He raised taxes, and then a crime spree in 1990 put the city on edge.

In the summer of 1991, the Crown Heights riots tore open festering racial wounds. Violence erupted in Brooklyn after a Hasidic driver hit and killed an African-American boy. A rabbinical student was killed during the four days of violence.

Dinkins faced heavy criticism from many in the Jewish community for what they said was the city's slow response.

The Black boycott of a Korean grocer in 1990 and riots in Washington Heights two years later added to the racial tension.

But he also scored successes: creating after-hours youth centers, launching a health program for low-income New Yorkers, putting more cops on the streets and creating the Civilian Police Complaint Review board, although a police corruption scandal rocked the city.

David Dinkins appears on NY1's first ever day on air, September 8, 1992.

An emotional high point for the mayor was welcoming Nelson Mandela to the city in the summer of 1990.

But his 1993 run for reelection turned into a bitter rematch against rival Giuliani.

Giuliani softened his image, but also pledged to crack down on crime and quality of life issues.     

Dinkins was facing a string of scandals, and just two months before the election, a devastating state-commissioned report on the Crown Heights riots portrayed the administration as inept.

Still, Dinkins enjoyed high-profile national endorsements from the likes of President Clinton.

In turn, a month before the election, former Mayor Koch endorsed Giuliani.

Dinkins held together his African-American base, while Giuliani relied on white voters fearful of crime and the city's economic troubles.

Dinkins was edged out by Giuliani by two points, the mirror opposite of four years before.

Dinkins rebuffed calls for a recount, saying the city needed reconciliation.

"We will help Rudy. And in so doing, we will help our city," he said.

After leaving office, the debonair Dinkins remained a presence in the city's political and social circles.  He hosted a weekly radio show and taught public affairs at Columbia University, drawing big names to his annual leadership forum.

An avid tennis player, in 2008, he underwent heart surgery, but vowed to quickly pick up his racket afterwards.

And though he twice endorsed Bill Thompson for mayor, he was also a supporter of the man who defeated Thompson in the 2013 Democratic primary, Mayor Bill de Blasio - who met his wife, Chirlane, while both were young staffers in the Dinkins administration.

De Blasio would honor Dinkins by renaming the municipal building in lower Manhattan after him in 2015.

Dinkins died six weeks after the death of his wife, Joyce.

He will be remembered for his elegance on and off the court, even when he lost a match.