Snapping its four-day long losing streak, the BSE benchmark Sensex today gained 40 points to 19,714 in afternoon deals.Earlier, the 30-share barometer recovered by over 139 points on emergence of buying by funds, tracking a firming trend in the Asian region.The Nifty at the National Stock Exchange moved up by 23 points to 5,990.