diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 3705037..b391ba9 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -42,6 +42,10 @@
   if (!parsed.parameters.empty()) {
     BOOST_THROW_EXCEPTION(std::invalid_argument("AccessStrategy does not accept parameters"));
   }
+  if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
+    BOOST_THROW_EXCEPTION(std::invalid_argument(
+      "AccessStrategy does not support version " + std::to_string(*parsed.version)));
+  }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 }
 
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index 076a3bb..45b0d72 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -50,6 +50,10 @@
   if (!parsed.parameters.empty()) {
     BOOST_THROW_EXCEPTION(std::invalid_argument("AsfStrategy does not accept parameters"));
   }
+  if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
+    BOOST_THROW_EXCEPTION(std::invalid_argument(
+      "AsfStrategy does not support version " + std::to_string(*parsed.version)));
+  }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 }
 
diff --git a/daemon/fw/best-route-strategy.cpp b/daemon/fw/best-route-strategy.cpp
index ad70ab6..b5f62a8 100644
--- a/daemon/fw/best-route-strategy.cpp
+++ b/daemon/fw/best-route-strategy.cpp
@@ -67,6 +67,10 @@
   if (!parsed.parameters.empty()) {
     BOOST_THROW_EXCEPTION(std::invalid_argument("BestRouteStrategy does not accept parameters"));
   }
+  if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
+    BOOST_THROW_EXCEPTION(std::invalid_argument(
+      "BestRouteStrategy does not support version " + std::to_string(*parsed.version)));
+  }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 }
 
diff --git a/daemon/fw/best-route-strategy2.cpp b/daemon/fw/best-route-strategy2.cpp
index 0ba94e8..974567a 100644
--- a/daemon/fw/best-route-strategy2.cpp
+++ b/daemon/fw/best-route-strategy2.cpp
@@ -46,6 +46,10 @@
   if (!parsed.parameters.empty()) {
     BOOST_THROW_EXCEPTION(std::invalid_argument("BestRouteStrategy2 does not accept parameters"));
   }
+  if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
+    BOOST_THROW_EXCEPTION(std::invalid_argument(
+      "BestRouteStrategy2 does not support version " + std::to_string(*parsed.version)));
+  }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 }
 
diff --git a/daemon/fw/client-control-strategy.cpp b/daemon/fw/client-control-strategy.cpp
index 8c99db2..b4bb601 100644
--- a/daemon/fw/client-control-strategy.cpp
+++ b/daemon/fw/client-control-strategy.cpp
@@ -39,6 +39,10 @@
   if (!parsed.parameters.empty()) {
     BOOST_THROW_EXCEPTION(std::invalid_argument("ClientControlStrategy does not accept parameters"));
   }
+  if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
+    BOOST_THROW_EXCEPTION(std::invalid_argument(
+      "ClientControlStrategy does not support version " + std::to_string(*parsed.version)));
+  }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 
   NFD_LOG_WARN("NextHopFaceId field is honored universally and "
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index 7a416e3..cbf409c 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.cpp
@@ -38,6 +38,10 @@
   if (!parsed.parameters.empty()) {
     BOOST_THROW_EXCEPTION(std::invalid_argument("MulticastStrategy does not accept parameters"));
   }
+  if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
+    BOOST_THROW_EXCEPTION(std::invalid_argument(
+      "MulticastStrategy does not support version " + std::to_string(*parsed.version)));
+  }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 }
 
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index cfc22cb..6369c2f 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -43,6 +43,10 @@
   if (!parsed.parameters.empty()) {
     BOOST_THROW_EXCEPTION(std::invalid_argument("NccStrategy does not accept parameters"));
   }
+  if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
+    BOOST_THROW_EXCEPTION(std::invalid_argument(
+      "NccStrategy does not support version " + std::to_string(*parsed.version)));
+  }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 }
 
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index 3009123..9f2dd19 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -48,24 +48,36 @@
   const Registry& registry = getRegistry();
   ParsedInstanceName parsed = parseInstanceName(instanceName);
 
-  ///\todo #3868 accommodate parameters
   if (parsed.version) {
-    NFD_LOG_TRACE("find " << instanceName <<
-                  " strategyName=" << parsed.strategyName << " versioned");
-    ///\todo #3868 if exact version unavailable, choose closest higher version
-    return registry.find(parsed.strategyName);
+    // specified version: find exact or next higher version
+
+    auto found = registry.lower_bound(parsed.strategyName);
+    if (found != registry.end()) {
+      if (parsed.strategyName.getPrefix(-1).isPrefixOf(found->first)) {
+        NFD_LOG_TRACE("find " << instanceName << " versioned found=" << found->first);
+        return found;
+      }
+    }
+
+    NFD_LOG_TRACE("find " << instanceName << " versioned not-found");
+    return registry.end();
   }
 
-  NFD_LOG_TRACE("find " << instanceName <<
-                " strategyName=" << parsed.strategyName << " unversioned");
-  Registry::const_iterator candidate = registry.end();
-  for (auto it = registry.lower_bound(parsed.strategyName);
-       it != registry.end() && parsed.strategyName.isPrefixOf(it->first); ++it) {
-    if (it->first.size() == parsed.strategyName.size() + 1) { // only one extra component: version
-      candidate = it;
+  // no version specified: find highest version
+
+  if (!parsed.strategyName.empty()) { // Name().getSuccessor() would be invalid
+    auto found = registry.lower_bound(parsed.strategyName.getSuccessor());
+    if (found != registry.begin()) {
+      --found;
+      if (parsed.strategyName.isPrefixOf(found->first)) {
+        NFD_LOG_TRACE("find " << instanceName << " unversioned found=" << found->first);
+        return found;
+      }
     }
   }
-  return candidate;
+
+  NFD_LOG_TRACE("find " << instanceName << " unversioned not-found");
+  return registry.end();
 }
 
 bool
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 1f34ce2..b7b7adb 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -47,6 +47,7 @@
   static void
   registerType(const Name& strategyName = S::getStrategyName())
   {
+    BOOST_ASSERT(strategyName.size() > 1);
     BOOST_ASSERT(strategyName.at(-1).isVersion());
     Registry& registry = getRegistry();
     BOOST_ASSERT(registry.count(strategyName) == 0);
