And Boro could very well use money from the sale of former captain Rhys Williams to fund the move for Ayala.
Swansea and Boro are talking over a deal for Williams, who looks set to seal a move to South Wales in the next 48 hours.
Boro have now stepped up their interest in Ayala, who has impressed since joining on loan from Norwich earlier in the season - but it remains to be seen if the deal will be permanent or a loan extension.
"We're near to a deal to keep him," said Boro boss Aitor Karanka.
"The club is working to keep him here, and he is an important player for me.
"The most important thing is that the club are doing everything they can. Would it be another loan or a permanent signing? We are working on lots of options."
On Williams, he admitted he was in the dark over his future.
"I don't know if there's been an offer," said Karanka.
"Rhys is my player, and he's been an important player in the last two or three games. I'm happy with him, but at this moment, I don't know (what will happen)."
Karanka is also hoping that they can extend the loan of Shay Given from Aston Villa until the end of the season.
"The club is working to keep him until the end so let's see what happens. I hope he can stay, I know the club is working on that," he said.
Meanwhile, Karanka insists that he is under no pressure from Jose Mourinho to use Chelsea loanees Kenneth Omeruo and Nathaniel Chalobah.
Omeruo joined earlier this month, but has yet to feature for the club - whilst Chalobah was not included in the weekend win over Charlton after arriving earlier in the week.
"I don't have to explain anything to Jose," he said. "He knows how it is. Maybe if we were losing games and the two weren't playing, he might be on the phone to me, but we're winning.
"It's the kind of problem that I want. We're delighted to have brought the two players from Chelsea, and I'm confident they'll fit in well here.
"It's a chance for them to get some experience under their belt. But they have a problem in that the team's playing very well and they know that. It's difficult for them."