More than 24,000 attempts were made to access pornographic websites in the Houses of Parliament since the general election, according to official data.

The figure of 24,473 attempts represents about 160 requests per day on average from computers and other devices connected to the parliamentary network – which is used by MPs, peers and staff – between June and October last year.

It comes amid a sex scandal in Westminster, during which Theresa May sacked her de facto deputy, Damian Green, after he made “misleading” statements about allegations that police found pornography on computers in his parliamentary office in 2008.

In his resignation letter, Green continued to deny “unfounded and deeply hurtful” claims that he downloaded or viewed the material.

The data, released after a freedom of information (FoI) request by the Press Association, shows a spike in September in the number of attempts to visit the sites, with 9,467 requests from both the Houses of Lords and Commons that month.

Parliamentary authorities say the majority of attempts are not deliberate.

The figures also show a sharp decrease in the number of attempts to access pornographic websites in recent years. In 2016, the parliamentary filtering system blocked 113,208 attempts, down from 213,020 the previous year.

Figures for January and February 2017 could not be provided by the parliamentary authorities due to changes in technology and the way the data is held. However, the available data showed there were 30,876 attempts from March to October.

During this period, parliament was dissolved from late April to early June ahead of the general election, and MPs were away during the summer recess from the end of July to early September.

A parliamentary spokesman said of the figures: “All pornographic websites are blocked by parliament’s computer network. The vast majority of attempts to access them are not deliberate. The data shows requests to access websites, not visits to them.

“There are 8,500 computers on the parliamentary network, which are used by MPs, peers, their staff and staff of both Houses. This data also covers personal devices used when logged on to parliament’s guest wifi.”

A separate FoI request showed there were also at least 2,751,755 attempts to access blocked websites on the parliamentary network from January to October this year.