The Judicial Investigating Organization said that the case had been under investigation for three months.
The agency’s summary left unclear if the threats had something to do with the female judge’s work or if the dispute was personal.
The 29-year-old woman who was detained Wednesday was reported to be working in the same offices as the judge who received the threats.
The shooting took place in July, said the judicial agency. A day later, the judge received a telephone call linking her to the shots and telling her to leave her job. She did not.
The woman and her 38-year-old brother were taken into custody in a judicial raid at 6 a.m. Wednesday in Escazú Centro.
Agents also searched a home in Alajuelita for evidence, the agency said.