ANKARA, Turkey — Britain will continue to support Turkey’s bid to join the European Union even after Britain itself leaves the bloc, British Foreign Secretary Boris Johnson said Monday.

Speaking at the start of a meeting with Turkey’s EU Affairs Minister Omer Celik, Johnson also said Turkey and Britain were united in the fight against terrorism.

Johnson, who has Turkish ancestry, is paying his first visit to Turkey as foreign secretary. The former mayor of London caused controversy in May by composing a vulgar poem that mocked Turkish President Recep Tayyip Erdogan. British officials have said Johnson is expected to receive a “warm welcome” in Turkey despite the controversy over the poem, which won a British magazine prize.

Johnson is expected to meet with Erdogan on Tuesday.

The foreign secretary was one of the leaders of the campaign for Britain to leave the EU

Celik said Turkey respected the British decision to leave the bloc but criticized the “anti-Turkish rhetoric” that emerged during the campaign.

“We have to close this ugly parenthesis and look to the future,” Celik said.

Earlier, Johnson visited a refugee camp near Turkey’s border with Syria where he toured a kindergarten and a school and chatted with Syrian refugee families. The foreign secretary also watched a group of Syrians who were trained in detecting and disposing of improvised explosive devices display their skills on an empty field near the camp, the state-run Anadolu Agency reported.

Turkey is home to an estimated 3 million refugees.