Spain and The United States have signed a Bilateral Agreement on Social Security, which will allow to meet the minimum requirements to be eligible to a pension in both States, by totalising (joining) the contributions period in each country.
In case you meet with the minimum requirements to access for a pension in both countries, both the Spanish and the US Social Security Systems will pay the corresponding portion of the pension in accordance with the period you have been paying Social Security in each State.
On the contrary, if you don´t meet with the minimum requirements to access for a pension, the Totalisation Agreement will help each country to pay the part of the pension that may correspond to you, considering the period you had been working and paying Social Security in each country. In this case, you must request for your pension under the terms of the Totalisation Agreement.