Australia on Saturday formally recognized West Jerusalem as Israel’s capital, becoming the third country to follow the example of the United States.

Prime Minister Scott Morrison announced the decision in a speech, stating: “The Australian government has decided that Australia now recognizes west Jerusalem, as the seat of the Knesset and many of the institutions of government, is the capital of Israel.”

"The Australian government has decided that Australia now recognizes west Jerusalem, as the seat of the Knesset and many of the institutions of government, is the capital of Israel." — Australian Prime Minister Scott Morrison

He added that the government of Australia still respects both a commitment to a two-state solution and long-standing respect for relevant U.N. Security Council resolutions.

But despite the recognition, the Australian embassy won’t be moved from Tel Aviv to Jerusalem until there’s a peace settlement between Israel and the Palestinians. A defense and trade office will be established in Jerusalem instead.

East Jerusalem, meanwhile, won’t be recognized as Palestine’s capital until the peace agreement is reached as well, the prime minister said.

ISRAELI TROOPS ARREST DOZENS IN WEST BANK RAID

Australia is now the third country after the United States to recognize Jerusalem as Israel’s capital.

Earlier this year, President Trump not only recognized Jerusalem as a whole city as the capital of Israel but moved the U.S. embassy to the Holy City as well.

But Australia’s decision is unlikely to please neither the Israelis nor Palestinians as it only recognizes the western part of the city.

ISRAEL LAUNCHES WEST BANK CRACKDOWN AFTER PALESTINIAN ATTACKS

While Israelis welcome recognition their claims to Jerusalem, Australia’s doesn’t recognize Jerusalem as a whole as the capital of Israel.

Palestinians generally object to countries unilaterally recognizing Jerusalem as the capital of Israel rather than letting the peace negotiations to determine the status and the fate of the city.

At home, Morrison was accused of using the issue as a political stunt to win a by-election in October for a seat in Sydney in an area with a large Jewish presence.

Abroad, Indonesia and Malaysia, two Muslim-majority countries, threatened the country with a free trade deal that has now been delayed over the issue.

The Associated Press contributed to this report.