The Atletico Madrid striker on Tuesday confirmed he was making himself available for Spain ahead of next year's World Cup, having been at the centre of a tug of war between the reigning world champions and the country of his birth.
"I hope people understand and respect my decision because it has been very difficult," the 25-year-old said.
"It was very difficult to choose between the country where you were born and the country that has given you everything.
"I looked at everything and saw that it was right and best to play for Spain because this is where I have done everything. All that I have in my life was given to me by this country.
"I have a special affection. Here I feel very appreciated for all that I do and I feel the love of the people."
Costa was born and raised in Brazil before moving first to Portugal at the age of 16 in 2006, joining Braga. He was snapped up by Atletico later that year, although he initially remained on loan in Portugal before moving to Spain full time in 2007.
Costa played for Brazil in March, but as the match was a friendly he is still able to switch allegiances.
"I hope people understand because it is not something against Brazil..." he added. "I have family in Brazil and it is the country where I was born. I hope that God allows me to live there again in the future."
Costa's decision hands Spain coach Vicente del Bosque a huge new weapon in attack.
The striker has scored 11 goals in 10 league matches this season, putting him at the top of the scoring charts as Atletico enjoy a strong start.
His first opportunity for a Spain debut will be the friendly against South Africa on November 19.