Lavilla was a lawyer by profession. He joined the board of lawyers of the Court of Auditors in 1958 and of the State Council in 1959. He joined the Tácitos, Catholic reformist group, in 1974. He became a senior member of the Christian Democratic Party. The group published articles in the Catholic daily, Ya, beginning by 1972. He was the undersecretary of industry in the last cabinet of Franco from 1974 to 1976.
Lavilla was appointed senator in 1977 and was in office until 1978. He was elected to the congress of deputies in 1979, representing Jaén province. He served as speaker of the Congress from 1979 to 1982, the first legislature after the approval of the new constitution. On 23 February 1981, members of the Civil Guard led by Antonio Tejero burst into the chamber in a failed coup d'état. Lavilla faced Tejero saying that "in this chamber, the orders are given by the presidency. This is over. Evict". The colonel obeyed and the deputies were able to occupy their seats after getting down. During the night of 23–24, he offered Tejero the members of the parliament Board as hostages and asked that they free the members of the government and the legislators, but Tejero rejected the move. During Lavilla's time in this office the first investiture debate took place according to the new Constitution; 33 organic laws, 231 ordinary laws and 71 law decrees were approved, and the first failed vote of confidence and a question of confidence were presented. Before the 1982 general election he led the Christian Democrat party. He was re-elected in 1982, representing Madrid province, but resigned from office in 1983.
Lavilla was named a permanent member of the Council of State by Royal Decree on 28 July 1983 at the proposal of Prime Minister, an office which he held until his death in 2020. On 28 December 1995 he was appointed chairman of the Council's first section. On 8 February 1999 he took office as a permanent member of the Royal Academy of Jurisprudence and Legislation and was its president between 2003 and 2012, being re-elected in 2008. In addition, he was a member of the advisory committee of FRIDE, a Madrid-based now defunct think tank organization.
Personal life
Lavilla was married to Juana Rubira García Valdecasas and they had four children. He died on 13 April 2020 at the age of 85 from an undisclosed illness.