Minesweeper 1-2-2-1 pattern: the mines are under the two 2s
In a 1-2-2-1 row along a straight edge, the two squares under the 2s are mines and the squares under the 1s are safe. Here is the proof, step by step.

The short answer
When the clues 1, 2, 2, 1 sit side by side along a straight edge of covered squares, flag the two squares directly next to the 2s and open the squares next to the 1s. There is no guess involved: it is the only arrangement that fits all four numbers.
Some pages state the opposite, that the mines are on the ends. That version breaks the 2s, as the check further down shows.
The setup
Picture four opened squares in a row showing 1, 2, 2, 1. Directly below them is a row of covered squares; call the four under the clues A, B, C and D. Everything above and beside the clues is already open, so the covered row is the only place their mines can be.
Each clue touches the covered square directly below it and the ones diagonally below it. The left 1 touches A and B. The left 2 touches A, B and C. The right 2 touches B, C and D. The right 1 touches C and D.
The proof in three steps
Step one: the left 1 touches A and B, so at most one of them is a mine.
Step two: the left 2 needs two mines among A, B and C. A and B can supply only one, so C must be a mine. The same argument from the right side makes B a mine.
Step three: B is now the one mine the left 1 is allowed, so A is safe. C does the same for the right 1, so D is safe. The result reads safe, mine, mine, safe.
Why mines on the ends cannot be right
Put mines on A and D and leave B and C empty. Each 1 sees exactly one mine, which looks fine. But the left 2 touches A, B and C and now sees only one mine, and so does the right 2. Both 2s are short by one, so that arrangement is impossible.
You can also count it out. Four covered squares can hold mines in 16 different ways. Only one of the 16, mines on B and C, satisfies all four clues.
When the covered row is longer
On a real board the covered row usually continues past A and D. Then the left 1 also touches the square to the left of A, and the right 1 touches the square to the right of D. The proof still works: each 1 still allows only one mine among its squares, each 2 still forces the mine on its far side, and once B and C are known both 1s are full. So those two extra squares are safe as well, and you open four squares instead of two.
Subtract flags before you look for it
The pattern is about how many mines each clue still needs, not the digit printed on the square. A 3 that already touches one flagged mine behaves like a 2, so a row reading 1, 3, 2, 1 can be a 1-2-2-1 in disguise.
The reverse matters too. If a mine touching one of these clues is already flagged, the plain pattern no longer applies. Reduce every clue by its flags first, then look again.
1-2-1 and 1-2-2-1 side by side
The two patterns are easy to mix up because the answers look opposite. In 1-2-1 the mines are under the 1s and the square under the 2 is safe. In 1-2-2-1 the mines are under the 2s and the squares under the 1s are safe. One rule covers both: the mines go where every 2 sees two of them while each 1 sees exactly one.
Does the 1-2-2-1 pattern work vertically?
Yes. It works along any straight edge: a horizontal row, a vertical column, or against the side of the board. Only the straight line of covered squares next to the clues matters.
Is 1-2-2-1 ever a guess?
No. When the setup matches and the clues have been reduced for existing flags, it is a certain deduction, so it is safe to use in no-guess play.
Where can I practise the 1-2-2-1 pattern?
Mine Field on Tapnook is an eight by eight board with ten mines, small enough that a 1-2-2-1 along an edge turns up often. Open a board, find a straight wall of covered squares and read the numbers along it.