President Tayyip Erdogan declared victory in a referendum on Sunday to grant him sweeping powers in the biggest overhaul of modern Turkish politics, but opponents said the vote was marred by irregularities and they would challenge its result.