After Khan's destructive spell tore through the visitors' top order, Ali stepped in with his own five-wicket haul, taking four wickets in his first three overs. This left West Indies struggling at 22-4.
Pakistan used spinners from the start after West Indies spinners Kevin Sinclair and Jomel Warrican claimed five scalps earlier in the day, with the hosts losing six wickets within 12 overs to finish their first innings on 230.
Starting from an overnight score of 143-4, Pakistan lost their standout batters Saud Shakeel and Mohammad Rizwan to Sinclair as Warrican dismissed three others on the spin-friendly pitch.
But the visitors had it worse, with Khan bowling out openers Kraigg Brathwaite and Mikyle Louis , as Keacy Carty also fell to the same bowler for a golden duck.
"The ball was new... I was going for wickets early on, which is why I conceded some runs," Khan, who allowed 65 runs in his 12 overs, told reporters.
Warrican, batting at number 10, put up the best resistance for the visitors with an unbeaten 31, building an innings-highest partnership of 46 runs with Jayden Seales for the last wicket.
Seales, who hit three sixes on his way to 22, was the joint second-highest contributor to the innings along with extras.
Masood and Muhammad Hurraira got Pakistan's second innings off to a commanding start with a 67-run opening partnership, before Hurraira was trapped leg before wicket by Warrican, who also dismissed Babar Azam later in a similar fashion.
Captain Masood looked set on 52 but paid the price for indecisiveness while taking a run, with Kavem Hodge's throw reaching Warrican while Masood was well short of the crease.
Pakistan ended the day on 109-3 with Kamran Ghulam and Saud Shakeel batting, as the umpires called stumps after bad light interrupted play.
"The aim is to restrict them to under 250, or even 275," Warrican said. "We don't want it to get over 250 because it's a spinning surface, it will be difficult.
This article was generated from an automated news agency feed without modifications to text.
Stay informed with the latest updates on live cricket score, cricket players, match schedules and ICC rankings. Keep an eye on your favourite cricket team, including the stellar performances of Rohit Sharma and Virat Kohli. Check out the cricket schedule, WTC 2025 Points Table track team standings and dive into player stats and rankings on Crickit powered by Hindustan Times website and app. .freemium-card h4{color:#fff; padding-bottom:20px;} .freemium-card .freemium-content .subcTxt{padding-bottom:16px; color:#fff;} .freemium-card .freemium-content{width: auto; max-width: inherit;} .freemium-card .freemium-content .subcTxt{max-width:inherit; font-size:18px; padding-top:0; line-height:24px} .freemium-card .btnSubc{margin} .freemium-card .btnSubc a{background:#000; color:#fff; min-width:auto; padding:5px 15px; border-radius:6px; font-size:16px; line-height:22px; font-weight:700;} .freemium-card{height:285px} @media (max-width: 767px) { .freemium-card h4{font-size:28px} .freemium-card .freemium-content{max-width:360px; padding: 20px;} .freemium-card{height:303px; background-position: 100% 0; } }