SAN DIEGO (AP) — Immigration authorities caught just over half of the people who illegally entered the U.S. from Mexico last year, according to a report commissioned by the Department of Homeland Security that offers one of the most detailed assessments of border security ever compiled.

The report found that 54 percent of people who entered illegally between border crossings got caught in the 2015 fiscal year. That’s much lower than the 81 percent success rate that Homeland Security cited publicly using a different counting method.

The 98-page report was completed in May, and Homeland Security officials have declined to release it, despite urging from some members of Congress.

The Associated Press obtained a copy from a government official involved in border issues who acted on condition of anonymity because the department has not made the report public.

The department said Thursday that the report was “one building block provided by a research organization” toward developing more reliable measures of border security and that its methodology needed refinement.

“DHS does not believe it is in the public interest to release, and it would be irresponsible to make policy or other judgments on the basis of analysis that is incomplete and remains a work in progress,” spokeswoman Marsha Catron said.

The report offers some of most detailed measures yet of how secure the border with Mexico is — a major issue in a presidential campaign that features Republican nominee Donald Trump calling for a wall along the entire 1,954-mile border.

The report includes enough material to argue that the government has made big strides or that it is falling woefully short.

In terms of people, 170,000 eluded capture during the 2015 fiscal year, 210,000 the previous year, and 1.7 million in 2005.

The number of people who eluded capture is larger when including those who escaped detection at border crossings or who entered by sea, which is the responsibility of Homeland Security agencies outside the Border Patrol. Adding those, 200,000 people got away last year, 260,000 in 2014, and 1.9 million in 2005.

The huge drop in illegal entries over the last decade coincides with major increases in border security spending, which has reached $14 billion annually.

The report notes more serious consequences imposed on illegal crossers during that period, which include jail time.

Immigration experts have also cited the significant decline in job opportunities after the Great Recession that began at the end of 2007. Still, sharp declines in illegal entries have continued in recent years as the economy improved.

“This is the first solid evidence we have that the border buildup of the last 20 years has indeed made some significant difference in deterring and reducing illegal entries across the southern border,” said Edward Alden, senior fellow at the Council on Foreign Relations.

The Border Patrol’s capture rate on the Mexican border was 55 percent in 2014 and 36 percent in 2005, according to the report prepared for Homeland Security by the Institute for Defense Analyses, a federally funded research organization.

The Border Patrol achieved an 11-point improvement in 2014 after years of slow but steady gains. The report does not offer an explanation for the sudden improvement.

The report, which includes an appendix of more than 100 pages on methodology and a review of previous efforts to count border crossers, offers detailed analysis going back to 2000, shortly before the U.S. erected hundreds of miles of fences along the Mexican border, added surveillance gear and doubled the number of Border Patrol agents.

Homeland Security has been under pressure to show if those multi-billion-dollar investments yielded results.

The primary measure that Homeland Security has released for public consumption is the number of Border Patrol arrests, which tells how many people got caught but not how many got away.

Arrests dropped to the lowest level in 44 years in 2015, down 80 percent from a peak of nearly 1.7 million in 2000.

For the last two years, the department has released an “interdiction effectiveness rate” that measures the percentage of people who got caught among all who attempted to enter between crossings on the Mexican border.

The figure includes those who set foot in the U.S. and turned around and asylum-seekers. It was 81 percent in the fiscal year that ended Sept. 30, 2015.

The report obtained by the AP takes a different approach. It does not credit the government for people who turn around or turn themselves in to agents to seek asylum, a common occurrence among Central American women and children who have entered the country in large numbers over the last five years, many of them fleeing drug-fueled violence.

The report says there were 140,000 asylum seekers on the Mexican border last year and 170,000 in 2014, compared to about 20,000 a year a decade ago.

Homeland Security’s practice of counting those as captures goes a long way toward explaining why its success rate was so much higher.

The report also counts people who entered the country illegally at border crossings — typically by presenting fake or stolen documents to immigration inspectors. Homeland Security does not publish those numbers.

The report says 28,000 escaped detection last year, down from 46,000 in 2014. The capture rate improved to 39 percent from 29 percent.

Counting border crossers who elude capture is a mammoth and imprecise task but one that many experts believe is necessary to judge whether the border is secure.

Homeland Security approaches the job by tracking physical evidence, such as footprints in the desert and other signs of human presence, and by agent sightings. The internal report uses that information, along with migrant surveys and techniques developed by social scientists.

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.