diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py
index 053d951..9e4b622 100644
--- a/voluptuous/schema_builder.py
+++ b/voluptuous/schema_builder.py
@@ -106,6 +106,10 @@ ALLOW_EXTRA = 1  # extra keys not in schema will be included in output
 REMOVE_EXTRA = 2  # extra keys not in schema will be excluded from output
 
 
+def _isnamedtuple(obj):
+    return isinstance(obj, tuple) and hasattr(obj, '_fields')
+
+
 class Undefined(object):
     def __nonzero__(self):
         return False
@@ -557,7 +561,11 @@ class Schema(object):
                     errors.append(invalid)
             if errors:
                 raise er.MultipleInvalid(errors)
-            return type(data)(out)
+
+            if _isnamedtuple(data):
+                return type(data)(*out)
+            else:
+                return type(data)(out)
 
         return validate_sequence
 

NamedTuples do not validate as tuples or named tuples
```
from collections import namedtuple

NT = namedtuple('NT', ['a', 'b'])

nt = NT(1, 2)
t = (1, 2)

Schema((int, int))(nt)    # => Invalid
Schema((int, int))(t)     # => Valid
Schema(NT(int, int))(nt)  # => Invalid
Schema(NT(int, int))(t)   # => Valid
````

Given that `NT(1, 2) == (1, 2) => True` I'd expect all of the above cases to return as valid.
diff --git a/voluptuous/tests/tests.py b/voluptuous/tests/tests.py
index 8759b13..7ddd092 100644
--- a/voluptuous/tests/tests.py
+++ b/voluptuous/tests/tests.py
@@ -1,4 +1,5 @@
 import copy
+import collections
 from nose.tools import assert_equal, assert_raises, assert_true
 
 from voluptuous import (
@@ -699,3 +700,14 @@ def test_number_validation_with_valid_precision_scale_yield_decimal_false():
     schema = Schema({"number" : Number(precision=6, scale=2, yield_decimal=False)})
     out_ = schema({"number": '1234.00'})
     assert_equal(out_.get("number"), '1234.00')
+
+
+def test_named_tuples_validate_as_tuples():
+    NT = collections.namedtuple('NT', ['a', 'b'])
+    nt = NT(1, 2)
+    t = (1, 2)
+
+    Schema((int, int))(nt)
+    Schema((int, int))(t)
+    Schema(NT(int, int))(nt)
+    Schema(NT(int, int))(t)

pip install -e .
parse_log_pytest
nose coverage coveralls pytest
apt-get update apt-get install -y gcc
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi==2025.1.31
charset-normalizer==3.4.1
coverage==7.8.0
coveralls==4.0.1
docopt==0.6.2
exceptiongroup==1.2.2
idna==3.10
iniconfig==2.1.0
nose==1.3.7
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
requests==2.32.3
tomli==2.2.1
urllib3==2.3.0
-e git+https://github.com/alecthomas/voluptuous.git@99fb7bd43b2cbd8e53cb9e50765c93339b2f7843#egg=voluptuous

name: voluptuous
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - coverage==7.8.0
      - coveralls==4.0.1
      - docopt==0.6.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - iniconfig==2.1.0
      - nose==1.3.7
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - requests==2.32.3
      - tomli==2.2.1
      - urllib3==2.3.0
prefix: /opt/conda/envs/voluptuous

voluptuous/tests/tests.py::test_named_tuples_validate_as_tuples
voluptuous/tests/tests.py::test_exact_sequence voluptuous/tests/tests.py::test_required voluptuous/tests/tests.py::test_extra_with_required voluptuous/tests/tests.py::test_iterate_candidates voluptuous/tests/tests.py::test_in voluptuous/tests/tests.py::test_not_in voluptuous/tests/tests.py::test_remove voluptuous/tests/tests.py::test_extra_empty_errors voluptuous/tests/tests.py::test_literal voluptuous/tests/tests.py::test_email_validation voluptuous/tests/tests.py::test_email_validation_with_none voluptuous/tests/tests.py::test_email_validation_with_empty_string voluptuous/tests/tests.py::test_email_validation_without_host voluptuous/tests/tests.py::test_fqdn_url_validation voluptuous/tests/tests.py::test_fqdn_url_without_domain_name voluptuous/tests/tests.py::test_fqdnurl_validation_with_none voluptuous/tests/tests.py::test_fqdnurl_validation_with_empty_string voluptuous/tests/tests.py::test_fqdnurl_validation_without_host voluptuous/tests/tests.py::test_url_validation voluptuous/tests/tests.py::test_url_validation_with_none voluptuous/tests/tests.py::test_url_validation_with_empty_string voluptuous/tests/tests.py::test_url_validation_without_host voluptuous/tests/tests.py::test_copy_dict_undefined voluptuous/tests/tests.py::test_sorting voluptuous/tests/tests.py::test_schema_extend voluptuous/tests/tests.py::test_schema_extend_overrides voluptuous/tests/tests.py::test_schema_extend_key_swap voluptuous/tests/tests.py::test_subschema_extension voluptuous/tests/tests.py::test_repr voluptuous/tests/tests.py::test_list_validation_messages voluptuous/tests/tests.py::test_nested_multiple_validation_errors voluptuous/tests/tests.py::test_humanize_error voluptuous/tests/tests.py::test_fix_157 voluptuous/tests/tests.py::test_range_exlcudes_nan voluptuous/tests/tests.py::test_equal voluptuous/tests/tests.py::test_unordered voluptuous/tests/tests.py::test_empty_list_as_exact voluptuous/tests/tests.py::test_schema_decorator_match_with_args voluptuous/tests/tests.py::test_schema_decorator_unmatch_with_args voluptuous/tests/tests.py::test_schema_decorator_match_with_kwargs voluptuous/tests/tests.py::test_schema_decorator_unmatch_with_kwargs voluptuous/tests/tests.py::test_schema_decorator_match_return_with_args voluptuous/tests/tests.py::test_schema_decorator_unmatch_return_with_args voluptuous/tests/tests.py::test_schema_decorator_match_return_with_kwargs voluptuous/tests/tests.py::test_schema_decorator_unmatch_return_with_kwargs voluptuous/tests/tests.py::test_schema_decorator_return_only_match voluptuous/tests/tests.py::test_schema_decorator_return_only_unmatch voluptuous/tests/tests.py::test_unicode_key_is_converted_to_utf8_when_in_marker voluptuous/tests/tests.py::test_number_validation_with_string voluptuous/tests/tests.py::test_unicode_key_is_converted_to_utf8_when_plain_text voluptuous/tests/tests.py::test_number_validation_with_invalid_precision_invalid_scale voluptuous/tests/tests.py::test_number_validation_with_valid_precision_scale_yield_decimal_true voluptuous/tests/tests.py::test_number_when_precision_scale_none_yield_decimal_true voluptuous/tests/tests.py::test_number_when_precision_none_n_valid_scale_case1_yield_decimal_true voluptuous/tests/tests.py::test_number_when_precision_none_n_valid_scale_case2_yield_decimal_true voluptuous/tests/tests.py::test_to_utf8 voluptuous/tests/tests.py::test_number_when_precision_none_n_invalid_scale_yield_decimal_true voluptuous/tests/tests.py::test_number_when_valid_precision_n_scale_none_yield_decimal_true voluptuous/tests/tests.py::test_number_when_invalid_precision_n_scale_none_yield_decimal_true voluptuous/tests/tests.py::test_number_validation_with_valid_precision_scale_yield_decimal_false
voluptuous/schema_builder.py
voluptuous/schema_builder.py