TAIPEI (Reuters) - Taiwan Semiconductor Manufacturing Co Ltd (TSMC) said its founder and chairman, Morris Chang, will retire next June, after having built the company into the world's biggest foundry chipmaker with a market value of about $185 billion.

Chang, who is 86, will be succeeded as chairman by Mark Liu who has served as co-CEO along with C.C. Wei since 2013. Wei will become the sole CEO.

The change in leadership change comes at a critical time as the Apple Inc supplier seeks to diversify its customer base and move into emerging industries such as artificial intelligence and autonomous driving.

It must also deal with a growing threat from Samsung Electronics, the world's top memory chipmaker, which plans to triple the market share of its contract chip manufacturing business within the next five years by aggressively adding clients.

Chang, citing personal and family reasons, said that upon his retirement, he would not sit on the board of directors or participate in management activities.

Chang founded TSMC in 1987 with paid-in capital of T$1.4 billion ($45 million) and pioneered contract chip manufacturing for chip design firms which don't have their own factories.

TSMC has since grown to command 56 percent of the $47 billion market while revenue has climbed to almost $30 billion in 2016.