Index: trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8249)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8250)
@@ -397,5 +397,5 @@
                 .addKeyword("child <i>expr</i>", "child ", tr("all children of objects matching the expression"), "child building")
                 .addKeyword("parent <i>expr</i>", "parent ", tr("all parents of objects matching the expression"), "parent bus_stop")
-                .addKeyword("nth:<i>7</i>", "nth: ", tr("n-th member of relation and/or n-th node of way"), "nth:5 (child type:relation)")
+                .addKeyword("nth:<i>7</i>", "nth: ", tr("n-th member of relation and/or n-th node of way"), "nth:5 (child type:relation)", "nth:-1")
                 .addKeyword("nth%:<i>7</i>", "nth%: ", tr("every n-th member of relation and/or every n-th node of way"), "nth%:100 (child waterway)")
                 , GBC.eol());
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 8249)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 8250)
@@ -846,7 +846,4 @@
 
         private Nth(int nth, boolean modulo) throws ParseError {
-            if (nth <= 0) {
-                throw new ParseError(tr("Positive integer expected"));
-            }
             this.nth = nth;
             this.modulo = modulo;
@@ -856,19 +853,28 @@
         public boolean match(OsmPrimitive osm) {
             for (OsmPrimitive p : osm.getReferrers()) {
-                Integer idx = null;
+                final int idx;
+                final int maxIndex;
                 if (p instanceof Way) {
                     Way w = (Way) p;
                     idx = w.getNodes().indexOf(osm);
+                    maxIndex = w.getNodesCount();
                 } else if (p instanceof Relation) {
                     Relation r = (Relation) p;
                     idx = r.getMemberPrimitivesList().indexOf(osm);
-                }
-                if (idx != null) {
-                    if (idx.intValue() == nth || (modulo && idx.intValue() % nth == 0)) {
-                        return true;
-                    }
-                }
+                    maxIndex = r.getMembersCount();
+                } else {
+                    continue;
+                }
+                if (nth < 0 && idx - maxIndex == nth) {
+                    return true;
+                } else if (idx == nth || (modulo && idx % nth == 0))
+                    return true;
             }
             return false;
+        }
+
+        @Override
+        public String toString() {
+            return "Nth{nth=" + nth + ", modulo=" + modulo + '}';
         }
     }
