Many Spaniards respect him for helping to thwart a rightist military coup in 1981 and strengthening democracy in the country .