The Spaniard was strongly linked with a move to the Bernabeu in the early stages of 2018, and it had been claimed that the stopper underwent a medical with Los Blancos during the winter window.
Kepa ultimately signed a new seven-year contract at San Mames, however, and the 23-year-old has said that ambitions of making the Spain squad for the 2018 World Cup played a key role in his decision.
"In order to play at the World Cup, I know I have to do well with my club, Athletic," Kepa told Cadena SER. "Rejecting Madrid? It's true that during the process, I decided to stay on the fringes. It was a time when I needed to think things through.
"It was a life decision, deciding which path to take in my career. I needed time to get together with my family and closest friends.
"In the end, I wanted to be sure and weigh everything up. Once it became clear, I made the decision I made by signing a contract for several years. I'm very happy about the path I've taken. I've signed on for seven more years."
Kepa has kept six clean sheets in 21 La Liga appearances for Bilbao this season.