The Scottish Government issued the threat after the UK's Europe minister, David Lidington, raised fresh concerns over the possible terms of an independent Scotland's EU membership.
He questioned whether existing EU countries would agree to an independent Scotland keeping its farm subsidies of almost £600 million per year.
However, the Scottish Government said it could negotiate a better deal for farmers and fishermen, backed by a threat to deny EU fleets access to North Sea and West Atlantic fishing grounds.
The First Minister's chief political spokesman said European countries would not be entitled to fish in Scottish waters if an independent Scotland was not a member of the EU.
He added: "It's exactly because that would be the case that we do not expect Spain and Portugal to cause problems for Scotland – or for themselves. We expect people to negotiate not in Scotland's best interests but from their self-interest. The consequence, if not, would be what we have described."
Under the common fisheries policies, boats from Spain, Portugal and other EU countries have quotas allowing them to fish in Scottish waters.
The Scottish Fisheries Protection Agency, which polices fishing activity in Scottish waters, has a fleet of three patrol vessels and two surveillance aircraft based at Inverness Airport.
The First Minister's spokesman declined to say whether the agency would receive extra resources to keep the fleets out of Scots waters.
His comments echoed a warning earlier this month from Deputy First Minister Nicola Sturgeon.
She had argued that an independent Scotland would be welcomed into the EU, adding: "Would Spanish, French and Portuguese fishermen want to be blocked from fishing the lucrative waters in Scotland's sectors of the North Sea and West Atlantic?"
The threat has not previously been linked to the specific terms of an independent Scotland's EU membership, which would have to be agreed by all member states.
Mr Lidington had warned an independent Scotland may struggle to retain current levels of EU agricultural subsidies.
Under the new Brussels common agricultural policy, new EU members from Eastern Europe receive lower subsidies.
Mr Lidington said: "An independent Scotland might have to accept a lower level of agricultural support in line with other new member states.
"To retain its subsidies other states would have to agree to Scotland leapfrogging them. Would Poland, Romania and Croatia be happy with that? I don't know."
The First Minister's spokesman said: "New member states went from having zero from Brussels to getting something. We are confident on the basis that Scotland is already part of the EU.
"The evidence suggests that as an independent member of the EU Scotland could receive up to £1 billion more than it currently does in farming support."
Last year just over 18,000 Scots farmers received £570m from the EU's single farm payment scheme and other subsidies.
Previously, the Scottish Government accepted an independent Scotland would have to negotiate key terms of membership.
Talks would be required on whether an independent Scotland should commit to joining the euro single currency, whether it would retain a share of the UK's valuable budget rebate and whether it could remain in the same common travel area as the UK and Ireland.
Meanwhile, legislation allowing 16 and 17-year-olds to vote in next year's independence referendum has been passed by MSPs.
The Scottish Independence Referendum (Franchise) Bill was approved by 103 votes to 12, with the Conservatives opposing the measure. LibDem and Greens failed in a bid to give prisoners serving short-term sentences a vote.