Anas Sarwar has slammed people who attempt to conflate the campaign for Scottish independence with the partition of India.
The Scottish Labour leader posted his annual social media message on August 14 to wish Pakistan a happy independence day - but quickly received dozens of responses questioning his opposition to Scottish independence.
Sarwar, whose father Mohammed was born in Pakistan before later becoming a Glasgow MP, said he was annoyed whenever people tried to portray Scotland as a "victim" of the British empire.
Speaking at an Edinburgh Fringe show hosted by Matt Forde today, the Scottish Labour leader said he received more social abuse on Pakistan's independence day than any other.
"Some, not all, nationalists are angry and try and conflate the issues," he said.
"It does annoy me when people try and pretend that Scotland somehow was a victim of empire, when in fact Scotland was at the heart of empire.
"I'll give you a practical example of that - my father became the governor of the Punjab and I went to his swearing-in ceremony.
"It was the first time I had been in Pakistan in 15 years and you go into this grand hall, and right at the top, there are pictures of every single governor there has been in Punjab.
"It includes governors from the time of the Raj - and I was struck by the number of Scottish names. Almost 50 per cent of the governors of the Punjab were Scots during colonisation and at the height of the British empire.
"Regardless of your position on Scottish independence, let's not pretend or conflate that Scotland was somehow colonised or was a victim.
"It was at the heart of the empire and that is why Glasgow was often referred to as the Second City of Empire.
"Another reason it is offensive is my own family, and lots of families across the country with Pakistanti or Indian heritage, have lost family members during the pursuit of independence and partition."
The partition of the Indian subcontinent occurred in 1947 when British colonial authorities gave independence to two new states - India and Pakistan.
The partition displaced between 10 and 20 million people along religious lines and has been described as one of the largest refugee crises in world history.
The number of people killed as a result of the partition is disputed but is thought to be somewhere between one and two million.
Sarwar's original tweet was supported by other politicians.
SNP MSP Tom Arthur said: "An important point from Anas Sarwar that sadly needs to be repeated - Scotland was at the heart of the British Empire.
"Indeed some of the first to argue in 20th century for Scottish autonomy did so with reference to Scotland being an equal partner with England in ruling the Empire."