WASHINGTON — President-elect Donald J. Trump spoke by telephone with Taiwan’s president on Friday, a striking break with nearly four decades of diplomatic practice that could precipitate a major rift with China even before Mr. Trump takes office.

Mr. Trump’s office said he had spoken with the Taiwanese president, Tsai Ing-wen, “who offered her congratulations.” He is believed to be the first president or president-elect who has spoken to a Taiwanese leader since at least 1979, when the United States severed diplomatic ties with Taiwan as part of its recognition of the People’s Republic of China.

In the statement, Mr. Trump’s office said the two leaders had noted “the close economic, political, and security ties” between Taiwan and the United States. Mr. Trump, it said, “also congratulated President Tsai on becoming President of Taiwan earlier this year.”

Mr. Trump’s motives in taking the call, which lasted more than 10 minutes, were not clear. In a Twitter message late Friday, he said Ms. Tsai “CALLED ME.”