Image copyright Reuters/PA

"I am shocked that Jeremy Corbyn, just in 2011, boasted that he had opposed every piece of anti-terror legislation in his 30 years in office."

- Amber Rudd, Home Secretary, BBC Election Debate

"Can I just remind you that in 2005 Theresa May voted against the anti-terror legislation at that time. She voted against it, as did David Davis, as did a number of people that are now in your cabinet because they felt that the legislation was giving too much executive power."

- Jeremy Corbyn, Labour leader, BBC Election Debate.

Labour leader Jeremy Corbyn has been accused by the Conservatives of consistently blocking anti-terror legislation. Last night, during the BBC Election Debate, Jeremy Corbyn suggested that Theresa May's record was inconsistent and that the prime minister had voted against some anti-terror measures in the past.

Reality Check has looked back at the key votes since 2000.

Theresa May and Jeremy Corbyn have taken very different paths to becoming leaders of their parties. Mrs May has almost exclusively served as a minister or shadow minister during her 20 years as an MP. In 2010 she became Home Secretary - after the Conservatives formed the coalition government with the Lib Dems. She remained in that post until becoming Prime Minister in 2016.

Mr Corbyn first became an MP in 1983 and had previously never held a position on the front bench before becoming leader in September 2015.

With that in mind, what is the record of both leaders when it comes to anti-terror legislation?

Terrorism Act 2000

This legislation - introduced by the Labour government - gave a broad definition of terrorism for the first time. The Act also gave the police the power to detain terrorist suspects for up to seven days and created a list of proscribed terrorist organisations.

May: Absent from the final vote (there was no Second Reading)

Corbyn: Voted against it

Context: This legislation was supported by both Labour and the Conservatives and was therefore highly unlikely to be defeated.

Sometimes MPs will seek an informal arrangement with opposition MPs not to vote together. This is known as pairing and is used when members have other commitments and are likely to miss a vote. It is not known whether Theresa May was paired in this case. As well as Mrs May, other absent MPs included Prime Minister Tony Blair and Conservative leader William Hague.

Mr Corbyn was one of a handful of rebels and spoke out against the legislation. He argued: "I am not in favour of violence or terrorism but one does not solve those problems by imprisoning the innocent."

Second Reading refers to a vote that takes place in Parliament before the legislation moves to a committee of MPs who scrutinise it line by line. Third Reading is the final chance for the Commons to debate the contents of the legislation.

Anti-terrorism, Crime and Security Act 2001

This was passed after the 11 September attacks in New York. It allowed foreign terrorist suspects to be detained indefinitely.

May: Voted for it at Second Reading; absent at Third Reading

Corbyn: Voted against it

Context: Again, like the 2000 Terrorism Act, the legislation was supported by the leadership of both parties. The vote was not close.

Mr Corbyn opposed it, saying the legislation was rushed, and argued it was "extremely dangerous because it is a denial of civil liberties".

Fourteen-day detention

This was a measure, contained in the Criminal Justice Act 2003, which allowed the police to question terrorist suspects for up to 14 days.

May: Voted against it

Corbyn: Voted against it

Context: The Conservative front bench opposed the act, saying it gave too much power to the then Home Secretary David Blunkett.

Control Orders

The creation of control orders was contained within the 2005 Prevention of Terrorism Act. A form of house arrest, control orders were replaced by Terrorism Prevention and Investigation Measures - or TPims - in 2012.

May: Voted against it

Corbyn: Voted against it

Context: The Conservative front bench opposed the act. David Davis, who was shadow home secretary at the time, said the legislation had "clearly been very badly drawn-up".

Mr Corbyn voted against. He has previously described control orders as damaging to community relations. He said: "They make people less, rather than more, co-operative with the police and everyone else."

ID cards

Legislation which paved the way for the controversial introduction of ID cards, was introduced by the Labour government in 2006. The coalition government, with Mrs May as home secretary, would go on to scrap the scheme in 2010.

May: Voted against it

Corbyn: Voted against it

Context: The Conservative front bench opposed the introduction of ID cards on the basis that the voluntary scheme would lead to "creeping compulsion".

Mr Corbyn also opposed, telling Parliament that ID cards "will not solve crime, fraud or terrorism".

Ninety-day detention

Drafted in the aftermath of the London 7/7 bombings, this legislation - part of the 2006 Terrorism Act - extended the detention-without-charge period from 14 to 28 days. The Labour government was forced to back down after trying to convince Parliament to back 90 days.

May: Voted against the 90-day aspect. She voted for it at the Third Reading after major changes

Corbyn: Voted against at every stage

Context: The Conservative front bench was strongly against the 90-day detention aspect and their opposition contributed to Tony Blair's first defeat in the Commons. The Conservatives did go on to support a Labour backbench MP's proposal to extend the detention period to 28 days, which was passed.

Mr Corbyn was one of 49 Labour MPs who rebelled against the government. He also voted against the subsequent proposal to extend detention without charge to 28 days.

Counter-terrorism Act 2008

This legislation gave powers to the police to question terrorist suspects after they had been charged. It also tried to extend detention without charge to 42 days, but the Labour government abandoned this after being defeated in the House of Lords.

May: Absent from the vote

Corbyn: Voted against it

Context: The position of the Conservative front bench was to abstain from the vote. The party was concerned with aspects of the 42-day detention proposal.

Mr Corbyn was also against the 42-days proposal. He was worried the plans would give increasing powers to government and that future home secretaries would extend the detention period still further.

Terrorism Prevention and Investigation Measures Act

This was the 2011 legislation used to replace control orders with TPims.

May: Voted for it

Corbyn: Voted against it

Context: Theresa May, as home secretary, introduced the new regime saying it would be more focused and targeted than control orders.

Justice and Security Act 2013

This legislation granted controversial new powers to close court doors on the grounds of national security. It allowed ministers to ask for a "closed material procedure" - an order to bar the public, press and claimant in a case from court.

May: Voted for it at Second Reading; absent at Third Reading

Corbyn: Voted against it

Context: This was legislation Mrs May introduced as Home Secretary. Even though she missed the vote at Third Reading it's almost certain this would have been an agreed absence as she spoke up for the bill in Parliament.

Mr Corbyn said he opposed secrecy in courts and voted against it.

The Investigatory Powers Act 2016

Referred to as the "snooper's charter" by critics, this legislation allowed for the bulk interception of communications.

May: Voted for it

Corbyn: Absent from the vote

Context: This was legislation introduced by Mrs May as home secretary. She said the ability to access telecommunications data would allow law-enforcement agencies to investigate criminal activity and protect the public.

This vote took place after Mr Corbyn was elected leader. He was absent from the Commons vote even though Labour, as a whole, voted for the legislation at Third Reading. It is not known whether he was paired. The party abstained at Second Reading.

Read more from Reality Check

Follow us on Twitter