MADRID — How is it that a baby-faced, 20-year-old university student skates his way into the coronation celebration of the new king, passes himself off as a government adviser to reportedly broker a lucrative business deal, and avoids traffic jams by flashing a fake police light?

That is the question members of Spain’s security services are asking themselves after the student, Francisco Nicolás Gómez Iglesias, was arrested last week and quickly gained prominence as the country’s most notorious gate-crasher.

The answer, disturbingly enough, is that he did it by falsifying police and secret service documents and pretending to hold several government and other official posts, Spain’s national police say.

The judge in charge of the case, Mercedes Pérez Barrios, was as incredulous as many other Spaniards at the extent of Mr. Gómez Iglesias’s double life. In her report, she wrote that she could “not understand how a young person of 20, using only his word and apparently under his own identity, could have access to conferences, places and events without his behavior alarming anybody.”