By JONATHAN J. COOPER

SACRAMENTO, Calif. (AP) — California has surpassed the United Kingdom to become the world’s fifth largest economy.

Federal data released Friday show California’s gross domestic product rose by $127 billion from 2016 to 2017, surpassing $2.7 trillion. The UK’s economic output slightly shrunk over that time as it prepared to leave the European Union.

Economists at the state Department of Finance say all economic sectors except agriculture contributed to California’s growth. Financial services and real estate led the pack, followed by the information sector, which includes technology companies.

California last had the world’s fifth largest economy in 2002 but fell as low as 10th, in 2012. Since then, the largest U.S. state has added 2 million jobs and grown its GDP by $700 billion.

The nations with the world’s four largest economies are the United States, China, Japan and Germany.