Pakistan batsman Babar Azam will be available to play for Somerset in their County Championship match against Warwickshire at Edgbaston on 18 August.
The 24-year-old is currently playing for Somerset in the T20 Blast, but has now also agreed to face the Bears.
Babar, who scored 474 runs for Pakistan in the World Cup, is the world number one ranked batsman in T20 cricket.
“He’s fitted in really well and we’re all looking forward to seeing him play,” said Somerset coach Jason Kerr.
“You can only have two overseas players on the books at one time and, due to the regulations, there simply isn’t the necessary time frame to re-register Azhar Ali.
“Fortunately for us Babar Azam has agreed to play in our four-day game at Warwickshire, which falls right in the middle of the T20 Blast.
“If he hadn’t agreed, we would have been without an overseas player for that match.”
Somerset, who are bidding to win the County Championship for the first in their history, are second in the table, four points behind leaders Essex.