You have agreed to Middle Up Down so you lead ♠6, partner covers the T with J that wins and returns ♠A. Then he shifts to ♣A and at trick four he leads the ♠K
♠6 ♠T ♠J ♠5
♠A ♠7 ♠8 ♠2
♣A ♣3 ♣9 ♣6 (♣9 is discouraging)
♠K ♥3 ♠4 ♠Q
What was the defensive error?

Help

p - p - 1♠ - X
p - 2♦ - p - 2♥
p - 3♥ - 4♥
lead ♠6 (Middle Up Down)