 In winter 617, the general Li Yuan the Duke of Tang, who had rebelled at Taiyuan earlier that year, captured Chang'an and declared Emperor Yang's grandson Yang You the Prince of Dai emperor (as Emperor Gong).Li Yuan assumed power as regent, and he wrote to Xiao Yu, requesting that Xiao submit.Xiao agreed, and was made the minister of census and created the Duke of Song.