German Chancellor Angela Merkel was due to hold talks with Turkish President Recep Tayyip Erdogan in Ankara on Thursday, one day ahead of an EU summit on migration in Malta. Merkel, who will also meet with Prime Minister Binali Yildirim, is expected to discuss a deal reached last year between the European Union and Ankara under which Turkey agreed to stem the flow of migrants into Europe. The chancellor has been criticized for the visit, her first to the country since Erdogan's government defeated an attempted coup by a military faction, and comes ahead of a referendum in Turkey on expanding the president's powers. Since the coup, Ankara has been waging a crackdown with the stated purpose of going after supporters of the coup - which the government blames on US-based cleric Fethullah Gulen - but has since been extended to wider parts of the opposition. More than 43,000 alleged Gulenists are jailed in Turkey. The government has also stepped up measures against Kurdish nationalists it has accused of terrorism. Germany and other EU countries have expressed concern that Erdogan is undermining the rule of law and freedom of expression in his country, and that the referendum on constitutional reforms is a further effort to expand his powers. The president's opponents say the new constitution would place too much power in one office and weaken parliament as well as checks and balances in the country, including the role of the judiciary. Merkel is due to meet with members of the centre-left People's Republican Party (CHP) and the pro-Kurdish Peoples' Democratic Party (HDP) after she concludes talks with the government. The HDP has been a target of the government for months, with thousands of its members in jail, including dozens of elected mayors and 12 members of parliament. They are often accused of spreading terrorist propaganda. The HDP says it is under pressure because of its opposition to the new constitution and proposal for decentralization of power. Tensions between Turkey and Germany had been on the rise prior to the failed putsch, in part after the parliament in Berlin declared the Ottoman Empire's mass killing of Armenians during World War I a genocide. Merkel's critics say the chancellor has become beholden to Erdogan in her bid to prevent an uptick in refugee arrivals ahead of Germany's national election this year in which she faces a challenge from the anti-immigrant Alternative for Germany party. Turkey is upset that it has not received more aid from Europe to help with more than 2 million Syrian refugees in the country. Moreover, it wants Europe to step up resettlement of the refugees. Other topics of discussion will likely include recent German asylum requests from a group of Turkish soldiers suspected of having links to the coup and the government's invitation of Turkish journalist and Erdogan critic Can Dundar to a Justice Ministry reception in Berlin.