Hillary Clinton has said Brexit should not be allowed to undermine the Northern Ireland peace process.
The former US secretary of state and presidential candidate was at Trinity College Dublin to receive an honorary degree.
She also referred to the recent referendum in the Republic of Ireland over abortion, describing the result as an "inspiring sight".
In May the Irish voted to replace a provision in their constitution which gave equal value to the life of the unborn foetus to that of the mother, with one permitting abortion in a limited number of circumstances.
"It was an example of grassroots activism fuelled by young people, and a triumph of the democratic process," she said.
Mrs Clinton also said the 1998 Good Friday Agreement which largely ended violence in Northern Ireland set an example for the rest of the world of what was possible when citizens came together to demand peace and worked to preserve it.
She added: "As the Brexit debate rages on, I continue to believe in the value of the European Union, and of a Europe that is whole, free and at peace.
"No matter the outcome of these discussions, Brexit should not be allowed to undermine the peace that people voted, fought and even died for."
The impact of Britain's withdrawal from the bloc next year on the Northern Ireland peace process which ended three decades of bloody violence is disputed.
The future of the Irish border is one of the most vexed outstanding issues facing negotiators in Brussels.
A variety of North/South co-operation mechanisms were established as part of the Good Friday Agreement.
Mrs Clinton first visited Northern Ireland in 1995 at a crucial time for the peace process.
She accompanied Bill Clinton as he became the first serving US president to visit Northern Ireland and they were greeted by huge crowds of well-wishers.
They switched on the Christmas lights in Belfast during a hugely symbolic visit.
A protest took place outside the building where Mrs Clinton had delivered her address, with some shouting "Clinton, out, out, out".
Dublin workers party councillor Eilis Ryan said: "Clinton has done nothing to progress the causes of women, she has abused the label of feminist in order to further her own agenda, and I think women involved in politics have a responsibility to reject that."