The opener managed just 67 runs in four innings during his country's two-Test tour of England earlier this summer, after which Pakistan head coach Mickey Arthur suggested that he was keen for the batsman to secure a deal in English cricket.
Pakistan opener Azhar Ali
Azhar Ali is to join Somerset on a short-term contract as the county's overseas replacement for Matt Renshaw.
Azhar will play seven matches for the County Ground side in the County Championship.
The opener managed just 67 runs in four innings during his country's two-Test tour of England earlier this summer, after which Pakistan head coach Mickey Arthur suggested that he was keen for the batsman to secure a deal in English cricket.
He will replace Renshaw, who became an instant hit in Taunton thanks to a prolific spell with the club after initially arriving as a deputy for Cameron Bancroft, his fellow Australian who is serving a nine-month ban for ball-tampering.
Renshaw made 513 runs in 11 Championship innings for Somerset earlier this season, hitting three centuries and averaging more than 63.
Matt Renshaw was well liked at Taunton
However, a broken finger sustained in late June ruled him out for the remainder of his allotted stay in the south west.
Somerset's next four-day outing starts this Saturday, when they are scheduled to take on Worcestershire at New Road.
“Finding the right fit at short notice can be challenging, however we are delighted to have secured a player of Azhar Ali’s character, pedigree and class for the remaining seven Specsavers County Championship matches," director of cricket Andy Hurry said.
“His experience at the top of the order will prove to be hugely valuable at the business end of the season. I have spoken to him several times over the last few weeks and he is very keen to share his knowledge of the game with our aspirational players, so the influence he can have within the changing room will also be vital for us as a club.”
COUNTY CHAMPIONSHIP LATEST: Click here