Prime Minister Theresa May visited Northern Ireland on Monday in a bid to allay fears about the impact of the United Kingdom's vote to leave the European Union on the British province's peace process, its border with Ireland and billions of pounds of EU funding. The June 23 Brexit vote has raised questions over the future of the open border between Northern Ireland and the Irish Republic, which will become Britain's only land frontier with the bloc. Concerns have also been raised about the legal status of the 1998 Good Friday Agreement, which ended three decades of fighting between Catholic nationalists seeking a united Ireland and Protestant unionists who wanted to keep Northern Ireland British. Over 3,600 died in the conflict. "I have been clear that we will make a success of the UK's departure from the European Union," May said in a statement. "That means it must work for Northern Ireland too, including in relation to the border with the Republic." May has said that details of future Irish border arrangements will hinge on the outcome of Brexit talks with Brussels. But she noted that there had been a common travel area with the Irish Republic since the 1920s. Northern Ireland voted to stay in the EU, with 56 percent voting ‘Remain', putting it at odds with the United Kingdom's 52-48 percent result in favor of leaving. The border issue has arisen because those in favor of leaving the EU were adamant that Britain must be able to control its borders - and hence immigration - more closely. May, making her first visit to Belfast since she became prime minister earlier this month, will meet the province's leader, Arlene Foster, who campaigned for Britain to leave the EU, and Deputy First Minister Martin McGuinness, a former Irish Republican Army commander who campaigned to remain. May has said she will work with all of Northern Ireland's political parties. After the vote, McGuinness demanded a referendum on Northern Ireland splitting from the United Kingdom to remain in the European Union as part of a united Ireland, a call rejected by the British government. "I am going to make it very clear that the people of Northern Ireland took a democratic decision in the referendum to see our future in Europe and that has to be respected," McGuinness told Irish state broadcaster RTE on Monday. "The British government, who appear determined to exit Europe, need to take account of the special circumstances that exist here in the north," McGuinness said. He has also raised concerns about whether the British government would replace billions of euros of agricultural subsidies and hundreds of millions of euros of peace funding provided by the European Union. Leaders north and south of the Irish border want to ensure that people and goods can continue to cross freely, as well as maintaining decades of open travel and trade across the Irish Sea that predate the countries' simultaneous accession to the EU in 1973. On Monday, a coalition of Northern Ireland politicians and human rights activists threatened a legal challenge against any British government move to leave the European Union unless the province's peace process is protected. The group, which includes members of the province's two largest Irish nationalist parties said they would apply for a judicial review if moves to exit failed to safeguard the Good Friday Agreement peace accord. The accord, which gives the Republic of Ireland a role, contains several references to the EU.