On 14 January 2007, she was named spokesperson for Sarkozy on the day he was chosen as UMP candidate for the presidential elections of April 2007. After Sarkozy's victory on 6 May 2007, she was appointed Minister of Justice. Her rationalization of the court system was publicly opposed by judicial professionals. Later on, it was recognised by the French Court of Auditor as one of the most ambitious reform of the judicial institution. When the Sarkozys' marriage began to break up, Dati frequently went on official presidential trips to accompany Nicolas Sarkozy. On 23 January 2009 Sarkozy announced that Dati would take the second position on the UMP candidate list for Île-de-France constituency in the European Parliament election in June 2009, to which she was elected. She left her post as minister after being elected as a European deputy. Soon after she left the government, in summer 2009, Dati switched to law, becoming a junior magistrate and assistant prosecutor. She also founded a consulting company called "La Bourdonnais consultant," which she had to dissolve at the beginning of 2010 to be able to resume the profession of lawyer, which she had to do by special dispensation (like other former magistrates). She sits on the editorial board of the French version of the "Huffington Post", where she writes a weekly column about women's issues. On the local level, Dati is the Mayor of the 7th district of Paris and Member of Paris City Council. On 9 February 2013, Dati announced she was a candidate for mayor of Paris in the 2014 local elections but she later withdrew because "the press has already chosen Nathalie Kosciusko-Morizet". A member of the European People's Party group in the European Parliament, Dati served on the Committee on Civil Liberties, Justice and Home Affairs and on the parliament's delegations for relations with the Mashreq countries, to the Parliamentary Assembly of the Union for the Mediterranean, and for relations with the Arab Peninsula. In parliament, Dati was the Parliament's rapporteur on several texts dealing with countering terrorism and the prevention of radicalisation and recruitment of European citizens by terrorist organisations. Following the Charlie Hebdo shooting in 2015, she drafted a report into how to prevent the radicalisation of young Europeans. Her parliamentary work also included dealing with the prison systems and conditions in the European Union, and finding solutions to face the migration crisis with an EU common list of safe countries of origin. In the UMP's 2012 leadership election, Dati endorsed Jean-François Copé.