Tsai Ing-wen, leader of the opposition Democratic Progressive Party (DPP), won the presidency with 56.1% of the vote, the official Central News Agency
said, after eight years under the government of the pro-China Kuomintang (KMT) or Nationalist Party.
Eric Chu, the Nationalist Party candidate in Taiwan's presidential election conceded defeat late Saturday and congratulated rival Tsai Ing-wen on her victory, the agency added.
Her supporters filled streets, waving party banners and cheering to victory announcements made from a stage.
The election also marked the first time the KMT has lost control of the island's legislature. The DPP took 68 of the 113 seats in Taiwan's parliament compared to the KMT's 35.
At a post-election news conference,
Tsai underscored Taiwan's commitment to democracy, calling it a value "deeply engrained in the Taiwanese people."
"Our democratic way of life is forever the resolve of Taiwan's 23 million people," she said.
But later in her speech, she also acknowledged the tenuous relationship with Beijing, saying both sides "have a responsibility to do their utmost to find mutually acceptable ways to interact ... and ensure no provocation and no surprises."
An editorial carried on China's official Xinhua news agency
said there was "no denying that the DPP's return rule poses grave challenges to cross-strait relations."
And a statement from China's Taiwan Affairs Office
quoted by Xinhua said it resolutely opposed "any form of secessionist activities seeking 'Taiwan independence.'"
Tsai's DPP has traditionally leaned in favor of independence for the island from mainland China.
That could anger Beijing, which views Taiwan as an integral part of its territory that is to be taken by force if necessary. Beijing has missiles pointed at the island.
"I voted for DPP, because it's very critical time for the Taiwan people. We have our own democracy systems, we will not be influenced by China," said Tsai Cheng-an, a 55-year-old Taipei professor.
The KMT forged closer ties with China under President Ma Ying-jeou. The new president will take over from Ma, who will step down on May 20 after serving two four-year terms.
China and Taiwan -- officially the People's Republic of China and the Republic of China -- separated in 1949 following the Communist victory on the mainland in the civil war.
The two sides have been governed separately since, though a shared cultural and linguistic heritage mostly endures -- with Mandarin spoken as the official language in both places.
The sides have agreed since 1992 on a "one China" policy, in which both governments claim sovereignty over mainland China and Taiwan -- but crucially neither recognizes the other's legitimacy.
"I voted for KMT because they are less likely to provoke cross-strait troubles. They want peace. That's why I chose them. We've lived through war, and it was not easy," said Chen, 83, a military veteran who declined to give his full name.
Taiwan's freewheeling democracy stands in sharp contrast to China's one-party state, and a cast of colorful candidates are contesting seats -- they include an ex-convict, an alleged spy and the front man of Asia's biggest death metal band.
Pop star's apology stirs anger
The strained relationship was highlighted over the weekend when teenage pop star Chou Tzu-yu made an apology for holding a Republic of China flag on South Korean TV, setting off a national debate.
From Taiwan, she is part of the South Korean pop act Twice. She appears in the video reading her apology off a sheet of paper, leading many to speculate that her Korean management company JYP Entertainment had coerced her to appease mainland Chinese fans, who represent a lucrative market.
There is only "one China", Chou said, and she will be taking a break from all China appearances to reflect on her actions.
The video even garnered a mention from Tsai in her victory speech, saying it "has shaken Taiwanese society."
"This particular incident will serve as a constant reminder to me about the importance of our country's strength and unity to those outside our borders. This will be one of the most important responsibilities for me as the next president of the Republic of China," Tsai said.
Tsai, a soft-spoken U.S.-educated lawyer, is viewed as a pragmatic leader but will have her work cut out balancing the interests of China, which is the island's biggest trading partner, the United States, its key ally, and the diverse demands of the island's 23 million residents.
In particular, a younger generation fears a future under the influence of Beijing and doesn't want Taiwan to become another Chinese territory.
"Taiwanese people are very peaceful. We want a peaceful relationship with mainland China, but that shouldn't mean we have to sacrifice our way of life and our democracy," said Huang Kuo-chang, leader of the New Power Party, one of a number of smaller opposition parties.
His party emerged from 2014's "Sunflower Movement," when scores of student protesters stormed and occupied Taiwan's Legislature and Cabinet building to object to a trade pact that symbolized Taiwan's deepening relations with mainland China.
The economy is a particular concern for many young people, with unemployment standing at 12% among 20- to 24-year-olds -- three times the overall jobless rate, according to official statistics.