Shamarh Brooks struck a magnificent maiden Test century before Rahkeem Cornwall claimed a 10-wicket match haul on day two to leave West Indies closing in on victory against Afghanistan.
Brooks showed great skill and application in only his third Test to make 111 after John Campbell fell for 55 as the Windies posted 277 in Lucknow.
Debutant Amir Hamza took 5-74 on a turning pitch to restrict the Windies' lead to 90 runs, but Afghanistan were reduced to 109-7 at stumps - leading by only 19 and facing a heavy defeat.
Cornwall claimed brilliant Test-best figures of 7-75 in only his second international on day one and helped himself to 3-41 on Thursday.
Roston Chase (3-10) also took advantage of spin-friendly conditions at Ekana International Cricket Stadium, striking a big blow by removing Javed Ahmadi for 62 with the final ball of the day.
Campbell and Brooks got Jason Holder's side off to a solid start after resuming on 68-2, but the opener departed when Ihsanullah took a fine catch anticipating the sweep off Hamza to end a stand of 82.
Shimron Hetmyer and Chase also fell before lunch, but Brooks played positively in the morning session, before reigning it in somewhat following the break.
Shane Dowrich (42) offered support to take the Windies into the lead and Brooks attacked Rashid Khan (3-114) after the wicketkeeper-batsman was removed by Zahir Khan.
Elegant Barbados batsman Brooks had struck a six and 15 fours by the time he was bowled by impressive left-armer Hamza.
Just as in their first innings, Afghanistan got off to an encouraging start, but they were 59-4 after losing four wickets for six runs - burly spinner Cornwall taking two in one over.
Ahmadi stood firm as wickets tumbled around him, but Chase produced a devastating late burst and had the opener caught by Cornwall just before the close to leave Afghanistan on the ropes.